Skip to content

"ModuleNotFoundError: No module named 'scripts'" due to overriding the 'mypy' entry point #238

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

Closed
AlirezaRoshanzamir opened this issue Oct 21, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@AlirezaRoshanzamir
Copy link

When installing the redisvl library, either directly or indirectly through dependencies like langchain-redis, the first-party mypy entry point (which we use for type-checking our Python code) gets overridden by your scripts:mypy entry point:
image

Which raises an error when we try to run mypy in our CI:
image

Your revised version is quite clear! Here’s a minor tweak to make it even more concise:

However, the issue is inconsistent and difficult to reproduce. It took me an entire day to identify the root cause, as it only occurred in our CI Docker runner. The problem arises because redisvl is usually installed after mypy in our CI (when using a lockfile).

@AlirezaRoshanzamir
Copy link
Author

My current workaround is to use the module syntax "python -m mypy" for running mypy.

@tylerhutcherson tylerhutcherson added the bug Something isn't working label Nov 12, 2024
rbs333 added a commit that referenced this issue Nov 18, 2024
@rbs333
Copy link
Collaborator

rbs333 commented Nov 18, 2024

@AlirezaRoshanzamir thanks for the input! After touching base with the team it seems we should rename or script to help avoid this collision. We have made the following pr for this #245.

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

No branches or pull requests

3 participants