cannot import name 'message_from_file'
See original GitHub issueWhen I try adding 'django_rest_passwordreset'
to django apps, I get this error:
Traceback (most recent call last):
File "manage.py", line 28, in <module>
from django.core.management import execute_from_command_line
File "/home/giovanni/git/ozzy-backend/venv/lib/python3.6/site-packages/django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "/home/giovanni/git/ozzy-backend/venv/lib/python3.6/site-packages/django/utils/version.py", line 6, in <module>
from distutils.version import LooseVersion
File "/home/giovanni/git/ozzy-backend/venv/lib/python3.6/distutils/__init__.py", line 25, in <module>
from distutils import dist, sysconfig
File "/usr/lib64/python3.6/distutils/dist.py", line 10, in <module>
from email import message_from_file
ImportError: cannot import name 'message_from_file'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 34, in <module>
) from exc
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
And removing it my app runs fine. Can you help me with this issue?
This has something to do with the email
package?
Django: 2.1.2 Python: 3.6 Using virtualenv.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
Showing ImportError: cannot import name 'Message' from 'can'
It's some kind of import bug. Try import Message like this: from can.message import Message. Everything worked for me.
Read more >email.parser: Parsing email messages — Python 3.11.1 ...
The BytesFeedParser , imported from the email.feedparser module, provides an API that is conducive to incremental parsing of email messages, such as would ......
Read more >ImportError: cannot import name 'OperationMessage · Issue #97
I installed syft-proto from source. Traceback (most recent call last): File "run_websocket_client.py", line 10, in import syft as sy File ...
Read more >cannot import name 'Message' from 'can' in my Ubuntu - Unix ...
I found this solution that worked for me: Try pip3 uninstall python-can but with "sudo" permissions. Raspberry Pi will work this out, ...
Read more >eMaRC Plus V: Configuring PHINMS Queue - CDC
e.g. We cannot have folder name like My Documents/HL7 Files. c. Importing message from file may take several minutes depending upon file-size.
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 FreeTop 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
Top GitHub Comments
@giovannicimolin @saurabhaec Do you happen to have a file called “email.py” (or a folder called “email”) somewhere within your project?
@anx-ckreuzberger : Aah may be there is one. I will check and tell you.Anyway thanks