模块'txaio'没有属性'make_batched_timer'

问题描述 投票:0回答:1

我正在关注this教程。

但是我收到了这个错误:

"C:\Program Files\JetBrains\PyCharm 2017.3.1\bin\runnerw.exe" 
C:\Users\srawa\AppData\Local\Programs\Python\Python36\python.exe 
C:/Users/srawa/OneDrive/django-practice/example_channel/manage.py runserver 8000 
Performing system checks... 
System check identified no issues (0 silenced). 
You have unapplied migrations; your app may not work properly until they are applied. 
Run 'python manage.py migrate' to apply them. 

January 01, 2018 - 20:07:53 Django version 1.9.3, using settings 'example_channel.settings' 

Starting Channels development server at http://127.0.0.1:8000/ 
Channel layer default (asgi_redis.RedisChannelLayer) 
Quit the server with CTRL-BREAK. 

Unhandled exception in thread started by
<function check_errors.<locals>.wrapper at 0x00000221817F76A8> 
Traceback (most recent call last): 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper fn(*args, **kwargs) 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\channels\management\commands\runserver.py",line 81, in inner_run action_logger=self.log_action, 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\daphne\server.py", line 19, in run self.factory = HTTPFactory(self.channel_layer, self.action_logger) 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\daphne\http_protocol.py", line 188, in __init__ self.ws_factory = WebSocketFactory(self) 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\daphne\ws_protocol.py", line 123, in __init__ WebSocketServerFactory.__init__(self, *args, **kwargs) 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\autobahn\twisted\websocket.py", line 255, in __init__ protocol.WebSocketServerFactory.__init__(self, *args, **kwargs) 
    File "C:\Users\srawa\AppData\Local\Programs\Python\Python36\lib\site-packages\autobahn\websocket\protocol.py", line 3096, in __init__ self._batched_timer = txaio.make_batched_timer(
AttributeError: module 'txaio' has no attribute 'make_batched_timer'

问题是什么?

python django django-channels
1个回答
0
投票

好的,所以我自己解决了。我安装的txaio版本是2.2.X.所以我刚刚将它更新到最新的2.8.2并且现在可以使用了。

© www.soinside.com 2019 - 2024. All rights reserved.