我在 Raspberry Pi 2 Model B上运行 python-3.2 中的脚本
线程看起来像这样:
myThread = threading.Thread(target=someFunction, args=(arg1,arg2,arg3),
daemon=True)
myThread.start()
每次调用此线程。此错误被触发:
TypeError: __init__() got an unexpected keyword argument 'daemon'
我知道 Debian Wheezy Version 7.10 没有 Python-3.4 稳定版本因此我必须使用 python 3.2
具有讽刺意味的是,Python 3.2 Documentation表明daemon
是一个可用的布尔值。
这是什么故障,我该如何解决?
答案 0 :(得分:4)
守护程序参数已在版本3.3 see中添加。在先前版本中设置标志的工作方式如下:
2016-06-25 16:15:08.339 FCM[7398:4128979] Configuring the default app.
2016-06-25 16:15:08.383 FCM[7398:] <FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-06-25 16:15:08.396: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-06-25 16:15:08.397: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2016-06-25 16:15:08.403: <FIRMessaging/INFO> FIRMessaging library version 1.1.0
2016-06-25 16:15:08.413: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-06-25 16:15:08.443 FCM[7398:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2016-06-25 16:15:08.508 FCM[7398:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-06-25 16:15:08.538: <FIRInstanceID/WARNING> APNS Environment in profile: development
2016-06-25 16:15:08.848 FCM[7398:4128979] Connected to FCM.
2016-06-25 16:15:08.893: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:15:22.311: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:15:36.774 FCM[7398:4128979] Unable to connect to FCM. Error Domain=com.google.fcm Code=2001 "(null)"
2016-06-25 16:15:40.552 FCM[7398:4128979] Subscribed to news topic
2016-06-25 16:15:43.100 FCM[7398:4128979] InstanceID token: (null)
2016-06-25 16:15:49.036: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:16:31.022: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:17:32.976: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:17:32.976: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries
2016-06-25 16:19:10.662 FCM[7398:4128979] InstanceID token: (null)
2016-06-25 16:19:10.980: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:19:10.981: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries