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

ModuleNotFound error with pylint-django plugin - pylint 3.0.2, pylint_django 2.5.5 #422

Open
danryu opened this issue Dec 6, 2023 · 3 comments

Comments

@danryu
Copy link

danryu commented Dec 6, 2023

Bug description

Seems to be a regression/repeat of https://github.com/pylint-dev/pylint/issues/7938 with pylint 3.x

Works fine with 2.15.9, 2.17.7.

Fails with ModuleNotFound error with 3.0.2.

Configuration

No response

Command used

pylint --load-plugins pylint_django --django-settings-module=myapp.settings myapp/

Pylint output

ModuleNotFoundError: No module named 'somemodule'

Expected behavior

successful pylint test output

Pylint version

pylint 3.0.2

OS / Environment

ubuntu 22.04

Additional dependencies

No response

@DanielNoord

This comment was marked as off-topic.

@Pierre-Sassoulas

This comment was marked as off-topic.

@Pierre-Sassoulas Pierre-Sassoulas transferred this issue from pylint-dev/pylint Dec 6, 2023
@jmhansen
Copy link

jmhansen commented Feb 7, 2024

I ran into this same issue, but it was happening sporadically. A coworker figured out that the ModuleNotFound error happened when we made changes to files within directories that were not Python modules. Adding a __init__py file to the directory fixed the issue for me.

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

4 participants