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

captcha module is being weird #644

Open
nworden opened this issue Apr 19, 2019 · 1 comment
Open

captcha module is being weird #644

nworden opened this issue Apr 19, 2019 · 1 comment

Comments

@nworden
Copy link
Contributor

nworden commented Apr 19, 2019

I've started sometimes getting errors about the config module's get_for_repo function, specifically errors that say it doesn't exist:
AttributeError: 'module' object has no attribute 'get_for_repo'

Deleting app/config.pyc (i.e., the "compiled" version of the file) resolves the problem, but only temporarily. This has been affecting Travis too (some of those failures are legit, but at the end they all start failing with this error about the config module).

I suspect this might be related to the stuff we've seen earlier from pylint about config imports being out of order (pylint seems convinced config is a "standard import" rather than our own module).

@nworden
Copy link
Contributor Author

nworden commented Apr 19, 2019

Bizarrely, this is resolved by using the full name of our captcha module when importing it from utils.py (PR #645) (I'd initially overlooked them because there were so many config module errors, but the earliest errors to surface are about the captcha import, and fixing that also resolves the problems with the config module). I'll leave this open until I understand what happened here, but I think this might be a reason to consider bumping the priority of issue #626 (moving out of the global namespace), especially for modules with higher risk of name collision.

@nworden nworden changed the title config module is being weird captcha module is being weird Apr 19, 2019
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

1 participant