What's the bad magic number error?

后端 未结 15 2363
心在旅途
心在旅途 2020-11-22 16:56

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

15条回答
  •  旧巷少年郎
    2020-11-22 17:34

    "Bad magic number" error also happens if you have manually named your file with an extension .pyc

提交回复
热议问题