wetneb / openrefine-wikibase

This repository has migrated to:
https://gitlab.com/nfdi4culture/ta1-data-enrichment/openrefine-wikibase
Other
100 stars 24 forks source link

AttributeError: module 'aioredis' has no attribute 'create_redis_pool' #118

Closed shigapov closed 3 years ago

shigapov commented 3 years ago

It seems the latest aioredis 2.0 does not (yet?) have create_redis_pool. May be for now the first line in requirements.txt can be changed to aioredis==1.3. See also https://github.com/aio-libs/aioredis-py/issues/1082.

reconcile_1  |  * Serving Quart app 'app'
reconcile_1  |  * Environment: production
reconcile_1  |  * Please use an ASGI server (e.g. Hypercorn) directly in production
reconcile_1  |  * Debug mode: True
reconcile_1  |  * Running on http://0.0.0.0:8000 (CTRL + C to quit)
reconcile_1  | Traceback (most recent call last):
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/quart/asgi.py", line 311, in __call__
reconcile_1  |     await self.app.startup()
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/quart/app.py", line 1755, in startup
reconcile_1  |     await self.ensure_async(func)()
reconcile_1  |   File "app.py", line 28, in setup
reconcile_1  |     app.redis_client = await aioredis.create_redis_pool(redis_uri)
reconcile_1  | AttributeError: module 'aioredis' has no attribute 'create_redis_pool'
reconcile_1  | 
reconcile_1  | During handling of the above exception, another exception occurred:
reconcile_1  | 
reconcile_1  | Traceback (most recent call last):
reconcile_1  |   File "app.py", line 341, in <module>
reconcile_1  |     app.run(debug=True, port=8000, host='0.0.0.0')
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/quart/app.py", line 1274, in run
reconcile_1  |     loop.run_until_complete(task)
reconcile_1  |   File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
reconcile_1  |     return future.result()
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/hypercorn/asyncio/__init__.py", line 39, in serve
reconcile_1  |     await worker_serve(app, config, shutdown_trigger=shutdown_trigger)
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/hypercorn/asyncio/run.py", line 66, in worker_serve
reconcile_1  |     raise exception
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/hypercorn/asyncio/lifespan.py", line 30, in handle_lifespan
reconcile_1  |     await invoke_asgi(self.app, scope, self.asgi_receive, self.asgi_send)
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/hypercorn/utils.py", line 239, in invoke_asgi
reconcile_1  |     await app(scope, receive, send)
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/quart/app.py", line 1722, in __call__
reconcile_1  |     await self.asgi_app(scope, receive, send)
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/quart/app.py", line 1748, in asgi_app
reconcile_1  |     await asgi_handler(receive, send)
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/quart/asgi.py", line 316, in __call__
reconcile_1  |     {"type": "lifespan.startup.failed", "message": str(error)},
reconcile_1  |   File "/usr/local/lib/python3.7/site-packages/hypercorn/asyncio/lifespan.py", line 80, in asgi_send
reconcile_1  |     raise LifespanFailure("startup", message["message"])
reconcile_1  | hypercorn.utils.LifespanFailure: Lifespan failure in startup. 'module 'aioredis' has no attribute 'create_redis_pool''
openrefine-wikibase_reconcile_1 exited with code 1
wetneb commented 3 years ago

Thank you! It sounds good to me, do you feel like making a PR for this? Otherwise I can commit it myself.