Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

376
Views
PyCharm/Django Setup: cannot import charset from email?

I've been asked to contribute to some in-production Python/Django code. I'm setting it up in PyCharm. When I run the app, I get this error message:

File "/myApp/myVirtualEnvironment/lib/python2.7/site-packages/django/core/mail/message.py",
 line 8, in <module>
  from email import (charset as Charset, encoders as Encoders)
   ImportError: cannot import name charset

What could be causing this?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

That may be caused by the name shadowing trap.

A cause may be that you are shadowing the Charset class, which is defined in the email.charset module, when you import from email import (charset as Charset, encoders as Encoders).

Another probable cause, supported by this issue:
If you check your file tree, you may find a file named charset.py or Charset.py which shadows the above mentioned

Search your files and you will find what casts the shadow.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!