python - IDLE closing when I try to run Pygame -
idle keeps closing whenever try run code.i've uninstalled idle , installed again twice now. i've tested other python files sure isn't problem in code.
i opened python command line, wrote idlelib import idle, opened python file , tried running , got this:
exception in tkinter callback traceback (most recent call last): file "c:\python34\lib\tkinter\__init__.py", line 1487, in __call__ return self.func(*args) file "c:\python34\lib\idlelib\multicall.py", line 179, in handler r = l[i](event) file "c:\python34\lib\idlelib\scriptbinding.py", line 127, in run_module_event return self._run_module_event(event) file "c:\python34\lib\idlelib\scriptbinding.py", line 141, in _run_module_event code = self.checksyntax(filename) file "c:\python34\lib\idlelib\scriptbinding.py", line 102, in checksyntax return compile(source, filename, "exec") typeerror: source code string cannot contain null bytes
i not using tkinter, using pygame @ moment. know idle written in tkinter. running python 3.4 know means? or better, how idle working again?
update: crashes pygame programs
to test file null bytes/codes, try following:
with open('myfile.py') f: i, line in enumerate(f, 1): # lines begin 1 j, char in enumerate(line): if not char: print('line %s: col %s' % (i,j))
Comments
Post a Comment