Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Redis Attribute Error occurred #132

Open
starunity opened this issue May 6, 2022 · 4 comments
Open

use Redis Attribute Error occurred #132

starunity opened this issue May 6, 2022 · 4 comments

Comments

@starunity
Copy link

(.venv) root@xxxx:/opt/etebase# uvicorn etebase_server.asgi:application --port 8000 --host 0.0.0.0
INFO:     Started server process [2446126]
INFO:     Waiting for application startup.
ERROR:    Traceback (most recent call last):
  File "/opt/etebase/.venv/lib/python3.9/site-packages/starlette/routing.py", line 621, in lifespan
    async with self.lifespan_context(app):
  File "/opt/etebase/.venv/lib/python3.9/site-packages/starlette/routing.py", line 518, in __aenter__
    await self._router.startup()
  File "/opt/etebase/.venv/lib/python3.9/site-packages/starlette/routing.py", line 598, in startup
    await handler()
  File "./etebase_fastapi/main.py", line 66, in on_startup
    await redisw.setup()
  File "./etebase_fastapi/redis.py", line 15, in setup
    self.redis = await aioredis.create_redis_pool(self.redis_uri)
AttributeError: module 'aioredis' has no attribute 'create_redis_pool'

ERROR:    Application startup failed. Exiting.

Python: 3.9.2
System: Debain 11

etebase-server.ini

[global]
secret_file = secret.txt
debug = false
;Set the paths where data will be stored at
static_root = /var/www/etebase/static
media_root = /var/www/etebase/media

;Advanced options, only uncomment if you know what you're doing:
;static_url = /static/
;media_url = /user-media/
;language_code = en-us
;time_zone = UTC
redis_uri = redis://localhost:6379

[allowed_hosts]
allowed_host1 = etebase.xxxx.com

[database]
engine = django.db.backends.postgresql
name = etesync
user = etesync
password = etesync
host = 127.0.0.1
port = 5432

suspected that the aioredis version is too high
reference aio-libs-abandoned/aioredis-py#1082

@tasn
Copy link
Member

tasn commented May 17, 2022

You mean that we don't support new enough aioredis?

@tasn
Copy link
Member

tasn commented May 17, 2022

@Xiretza, is this one of the things you looked at recently in terms of modernizing deps? Or is this an unrelated issue?

@Xiretza
Copy link
Contributor

Xiretza commented May 18, 2022

No, I hadn't looked at this - the problem seems to be that the requirements.txt specifies aioredis==2.0.1, even though the code is only compatible with the legacy 1.x releases. There is some documentation on the migration here: https://aioredis.readthedocs.io/en/latest/migration/

@tasn
Copy link
Member

tasn commented May 18, 2022

That's why I thought that maybe it's something we updated recently. Weird that it stopped working like this. Maybe people don't normally use the redis extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants