用于Firebase抛出错误的Python侦听器

时间:2018-01-05 08:48:23

标签: python firebase firebase-realtime-database

我正在尝试在firebase上运行python流式监听器:

def p(x):
 print (x)

fb = Firebase('https://myfirebase.firebaseio.com/')
custom_callback = fb.child("chat").listener(p)

# Start and stop the stream using the following
custom_callback.start()
input("ENTER to stop...")
custom_callback.stop()

但是我收到了这个错误:

    "ENTER to stop...Exception in thread Thread-1:
    Traceback (most recent call last):
    "..\Python\Python36\lib\threading.py", 
    line 916, in _bootstrap_inner
    self.run()
  ...firebase_streaming.py", line 54, in run
    for msg in self.sse:
     TypeError: 'ClosableSSEClient' object is not iterable

我能理解这是什么问题?  谢谢你的帮助。

0 个答案:

没有答案