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
No module named 'redis.commands' #121
Comments
Are you using json module? |
Hi, In version 2.0.0 support for redis-py < 4 was removed. However, you are using redis-py version: 2.7.1 while the apache-airflow-providers-redis package requires redis-py ~3.2. I can update fakeredis so you won't get this exception, but you won't be able to use JSON commands. |
@cunla Yes, please update fakeredis library, IMHO the best would be to convert this exception to warning |
Fixed, will be in next version |
@cunla When approximately should we expect the new version? |
@diman82 , cunla just released a new version |
@cunla @hyeongguen-song Confriming issue has been resolved |
Describe the bug
Using latest version of the package 2.7.1, I get the following error:
`ERROR: tests.test_custom_xcom (nose2.loader.ModuleImportFailure)
ImportError: Failed to import test module: tests.test_custom_xcom
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/nose2/plugins/loader/discovery.py", line 204, in _find_tests_in_file
module = util.module_from_name(module_name)
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/nose2/util.py", line 76, in module_from_name
import(name)
File "/home/runner/work/data-management-airflow-2/data-management-airflow-2/tests/test_custom_xcom.py", line 7, in
import fakeredis
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/fakeredis/init.py", line 1, in
from ._server import FakeServer, FakeRedis, FakeStrictRedis, FakeConnection, FakeRedisConnSingleton
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/fakeredis/_server.py", line 12, in
from fakeredis._fakesocket import FakeSocket
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/fakeredis/_fakesocket.py", line 1, in
from fakeredis.stack import JSONCommandsMixin
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/fakeredis/stack/init.py", line 7, in
raise e
File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/fakeredis/stack/init.py", line 3, in
from redis.commands.json.path import Path # noqa: F401
ModuleNotFoundError: No module named 'redis.commands'`
To Reproduce
Steps to reproduce the behavior:
Expected behavior
sub-dependency module is correctly imported
Desktop (please complete the following information):
Additional context
having latest apache-airflow-providers-redis package, which installs redis==3.5.3
The text was updated successfully, but these errors were encountered: