Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: bad magic number in 'time': b'\x03\xf3\r\n' in Django

Tags:

python

django

I got this error while running the Django app file that I had downloaded from GitHub. How can I solve this problem?

like image 997
user10379791 Avatar asked Sep 24 '18 10:09

user10379791


People also ask

How do I fix a bad magic number error?

Solution 2: Reinstalling the package – The error is just because of the temporary file. If we reinstall the package, the new temp file will be generated. In this way also we can get rid of the bad magic number-related errors.


2 Answers

Please go to your home directory. And then:

 sudo find . -name "*.pyc" -exec rm -f {} \; 
like image 145
bruce Avatar answered Sep 20 '22 11:09

bruce


Finally, I found the answer, The project has .pyc files, which holds the previous version information and time date, so this error. After deleting those files I got the output.

like image 30
user10379791 Avatar answered Sep 22 '22 11:09

user10379791