What\'s the \"Bad magic number\" ImportError in python, and how do I fix it?
The only thing I can find online suggests this is caused by compiling a .py -> .pyc file
In my case it was not .pyc but old binary .mo translation files after I renamed my own module, so inside this module folder I had to run
.pyc
.mo
find . -name \*.po -execdir sh -c 'msgfmt "$0" -o `basename $0 .po`.mo' '{}' \;
(please do backup and try to fix .pyc files first)