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

redis.commands module missing in pypi release 4.0.0b2 #1645

Closed
guigarfr opened this issue Oct 26, 2021 · 4 comments · Fixed by #1649
Closed

redis.commands module missing in pypi release 4.0.0b2 #1645

guigarfr opened this issue Oct 26, 2021 · 4 comments · Fixed by #1649
Assignees
Labels
bug Bug

Comments

@guigarfr
Copy link

guigarfr commented Oct 26, 2021

client.py is trying to import from the redis.commands module, and this import raises ModuleNotFoundError: No module named 'redis.commands'

.../site-packages/redis/client.py:9: in <module>
    from redis.commands import CoreCommands, RedisModuleCommands, list_or_args
    E   ModuleNotFoundError: No module named 'redis.commands'

Version: 4.0.0b2

Platform: Ubuntu

Description:

I'm getting the error ModuleNotFoundError: No module named 'redis.commands' after installing redis version 4.0.0b2

According to github, the tag 4.0.0b2 has a module named commands.
When downloading the tar.gz from pypi, the module is not there.

@guigarfr guigarfr changed the title Wrong released package 4.0.0b2 Wrong release package 4.0.0b2: redis.commands module missing Oct 26, 2021
@guigarfr guigarfr changed the title Wrong release package 4.0.0b2: redis.commands module missing Wrong released version 4.0.0b2: redis.commands module missing Oct 26, 2021
@guigarfr guigarfr changed the title Wrong released version 4.0.0b2: redis.commands module missing redis.commands module missing Oct 26, 2021
@guigarfr guigarfr changed the title redis.commands module missing redis.commands module missing in pypi release 4.0.0b2 Oct 26, 2021
@chayim
Copy link
Contributor

chayim commented Oct 26, 2021

@guigarfr Wow - thanks for the great catch. A new package will have to upstream shortly. I'm not sure why setup didn't bulid the package - but I'm hunting.

@chayim chayim self-assigned this Oct 26, 2021
@chayim chayim added the bug Bug label Oct 26, 2021
chayim added a commit that referenced this issue Oct 26, 2021
@chayim
Copy link
Contributor

chayim commented Oct 26, 2021

For the curious - setup.py build/sdist didn't automatically descend into redis.commands. The change linked here adds redis.commands to the packages tree. A new release is coming.

chayim added a commit that referenced this issue Oct 26, 2021
* Fixing the package to include commands.

Fixes #1645
@ruslaniv
Copy link

ruslaniv commented Sep 1, 2023

It is marked as closed, but I'm still getting exactly the same error:

pip install "redis[hiredis]"
Requirement already satisfied: redis[hiredis] in /home/ruslan/.cache/pypoetry/virtualenvs/datascience-5HzBPYEV-py3.11/lib/python3.11/site-packages (4.6.0)
Requirement already satisfied: hiredis>=1.0.0 in /home/ruslan/.cache/pypoetry/virtualenvs/datascience-5HzBPYEV-py3.11/lib/python3.11/site-packages (from redis[hiredis]) (2.2.3)

image

@ruslaniv
Copy link

ruslaniv commented Sep 1, 2023

Ok, I have an extension that syncs .ipynb to .py files.
It looks like that py file gets executed too when I do the import. But why would redis fail on the second import of the same objects? It should not even import them, since they already have been imported.

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

Successfully merging a pull request may close this issue.

3 participants