You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SyntaxError: invalid syntax -- e.g. "for i range(360):" #112
When entering some invalid Python code that throws a SyntaxError, e.g. for i range(360):, then the application hangs. (At least, that's what's happening when launched via PyCharm.)
On Tue, Sep 25, 2018, 20:51 Peter Bittner ***@***.***> wrote:
When entering some invalid Python code that throws a SyntaxError, e.g. for
i range(360):, then the application hangs. (At least, that's what's
happening when launched via PyCharm.)
Process TurtleProcess-1:Traceback (most recent call last):
File "/home/peter/Development/repos/PythonTurtle/src/shelltoprocess/console.py", line 74, in runsource
code = self.compile(source, filename, symbol)
File "/usr/lib/python3.6/codeop.py", line 168, in __call__
return _maybe_compile(self.compiler, source, filename, symbol)
File "/usr/lib/python3.6/codeop.py", line 99, in _maybe_compile
raise err1
File "/usr/lib/python3.6/codeop.py", line 87, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
File "/usr/lib/python3.6/codeop.py", line 133, in __call__
codeob = compile(source, filename, symbol, self.flags, 1)
File "<console>", line 1
for i range(360):
^SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/peter/Development/repos/PythonTurtle/src/turtleprocess.py", line 257, in run
self.console.interact()
File "/home/peter/Development/repos/PythonTurtle/src/shelltoprocess/console.py", line 144, in interact
more = self.push(line)
File "/home/peter/Development/repos/PythonTurtle/src/shelltoprocess/console.py", line 50, in push
more = self.runsource(command, self.filename)
File "/home/peter/Development/repos/PythonTurtle/src/shelltoprocess/console.py", line 77, in runsource
self.showsyntaxerror(filename)
File "/home/peter/Development/repos/PythonTurtle/src/shelltoprocess/console.py", line 60, in showsyntaxerror
msg, (dummy_filename, lineno, offset, line) = valueTypeError: 'SyntaxError' object is not iterable
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#112>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADdyu7ce48HUCYvbfqkUTIxb0fVr-Eyks5uem0cgaJpZM4W5K5O>
.
In the Python 2 version this doesn't crash the application. When I run the current code base with Python 3 from the terminal I get the same error as above. That means, we have an error that didn't exist before migrating to Python 3. 😕 -- I'm really sorry!
On Tue, Sep 25, 2018, 21:22 Peter Bittner ***@***.***> wrote:
In the Python 2 version this doesn't crash the application. When I run the
current code base with Python 3 from the terminal I get the same error as
above. That meant we have an error that didn't exist before migrating to
Python 3. 😕 -- I'm really sorry!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#112 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADdyoJXfbowGumNEoLZmuC-mqB1G-Syks5uenR2gaJpZM4W5K5O>
.
Activity
cool-RR commentedon Sep 25, 2018
bittner commentedon Sep 25, 2018
In the Python 2 version this doesn't crash the application. When I run the current code base with Python 3 from the terminal I get the same error as above. That means, we have an error that didn't exist before migrating to Python 3. 😕 -- I'm really sorry!
cool-RR commentedon Sep 25, 2018
bittner commentedon Oct 2, 2018
Cool! 👍
Awesome fix!
bittner commentedon Oct 3, 2018
This removes one blocker for #85.
Fix PythonTurtle#112, display of SyntaxError