'python ImportError: bad magic number in 'collections': b'3\r\r\n' [duplicate]

I decompyled a .pyc file with decompyle3. Now when I'm try to run the python script it returns me this error:

File "server_eolstep2.py", line 6, in <module>
    from flask_restful import Api
  File "AppData\Local\Programs\Python\Python37\lib\site-packages\flask_restful\__init__.py", line 2, in <module>
    from functools import wraps, partial
  File "AppData\Local\Programs\Python\Python37\lib\functools.py", line 21, in <module>
    from collections import namedtuple
ImportError: bad magic number in 'collections': b'3\r\r\n'

I'm using python 3.7.0 I yet installed flask_restful but I don't know the kind of this error.

ps I removed the name of the folder before Appdata.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source