无法在firebas中打印来自我的节点的值

2024-06-28 19:08:25 发布

您现在位置:Python中文网/ 问答频道 /正文

Firebase结构看起来像这样

characters
     -Lt9nfslaIKgoe7E3SHT
     -LtA93jCQn-2Kmf4gP-S
     -LtK-Bk156abpROmhxgI
     ... 
          in these keys booleans are saved from 1 - 64, true or false
          1: true,
          2: true,
          3: false,
          ...

我想记录每个键的数组值

char_ref = db.reference('characters/{}' + str.format(char_key_array[3]))

返回0x74dfb970处的firebase_admin.db.Reference对象

char_snapshot = char_ref.get()

不返回

有人知道为什么char\u snapshot=char\u ref.get()返回none吗


Tags: inreffalsetruedbgetsnapshot结构