python list.clear() works in code, not in compiled version

时间:2017-04-24 17:32:34

标签: python pygame exe

I have a python game, made in pygame. the game runs and works ok when run as a python script. I have compiled the script into an exe file, this did also works fine before I made some changes to the game. Now when launching the .exe an error is thrown:

    Traceback (most recent call last):
  File "pyg.py", line 22, in <module>
  File "runpy.pyc", line 240, in run_path
  File "runpy.pyc", line 82, in _run_module_code
  File "runpy.pyc", line 72, in _run_code
  File "game.py", line 378, in <module>
    occupied.clear()
AttributeError: 'list' object has no attribute 'clear'

Does anyone have any idea, why my program runs in the IDE but not in the .exe file?

0 个答案:

没有答案