apps.py: Attempted relative import with no known parent package
See original GitHub issueAttempting to run migrate on a fresh pip install in Django 1.10.7, I got the error
File "/Users/me/.virtualenvs/proto/lib/python3.6/site-packages/django_q/apps.py", line 3, in <module>
from .conf import Conf
ImportError: attempted relative import with no known parent package
I was able to fix this by directly editing django_q/apps.py and changing:
from .conf import Conf
to
from django_q.conf import Conf
I’d do a PR for this, but am not quite sure of what’s going on since no one else seems to be experiencing it. Theories?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Flask: ImportError: attempted relative import with no known ...
works with python -m app.app or python app/app.py from the ... files (and from the looks of it a sqlite-database?) with your package....
Read more >attempted relative import with no known parent package - IQ-Inc
How to fix ImportError: attempted relative import with no known parent package. Learn why it happens and Python import best-practices.
Read more >Python relative imports in AWS Lambda fail with ... - Github-Gist
Python relative imports in AWS Lambda fail with attempted relative import with no known parent package. The Problem. In AWS Lambda if I...
Read more >[ERROR FIXED] “Attempted relative import in non ... - Finxter
Another approach to deal with this error is to use the sys.path.append() function to add the directory of the required module to the...
Read more >[ERROR FIXED] “Attempted relative import in non ... - YouTube
Full Tutorial: https://blog.finxter.com/error-fixed- attempted - relative - import -in-non- package -even-with-__init__- py /Email Academy: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I didn’t see a PR for this, since I’m doing some updates. I’ll see if I can fix some of the relative imports in the code for the next release.
Closing this issue because #264 has been merged. If you still experiencing an issue please reopen this issue