Next time you feel like hitting your head against the wall because your Python code won't start due to an issue that should not be, try this instead:
find . -name \*.pyc -delete
Try again now.
You are welcome.
If it didn't help, sorry. I wish you well on your Google search journey.
This saved me more than a few times when my Django app would not start because some old PYC files were left in Vagrant guest after I switched from a development branch.