I can't start the turtle
when the program starts, it outputs various errors from other files.
from turtle import*
forward(10)
pu()
done()
output:
File "c:\users\zarte\desktop\untitled-1.py", line 2, in <module>
import turtle
File "d:\vsyakoe\python\lib\turtle.py", line 107, in <module>
import tkinter as TK
File "d:\vsyakoe\python\lib\tkinter\__init__.py", line 53, in <module>
_magic_re = re.compile(r'([\\{}])')
File "d:\vsyakoe\python\lib\re\__init__.py", line 227, in compile
return _compile(pattern, flags)
File "d:\vsyakoe\python\lib\re\__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
File "d:\vsyakoe\python\lib\re\_compiler.py", line 743, in compile
p = _parser.parse(p, flags)
File "d:\vsyakoe\python\lib\re\_parser.py", line 980, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
File "d:\vsyakoe\python\lib\re\_parser.py", line 455, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
File "d:\vsyakoe\python\lib\re\_parser.py", line 864, in _parse
if not source.match(")"):
File "d:\vsyakoe\python\lib\re\_parser.py", line 249, in match
self.__next()
File "d:\vsyakoe\python\lib\re\_parser.py", line 234, in __next
char = self.decoded_string[index]
builtins.IndexError: string index out of range
or other else.
Comments
This may be a problem with your Python installation and you might try re-installing. Does it work outside of Wing?
I've already tried reinstalling both python and wing. if you run the same file through idle, it works without errors.
Does it work from the command line? What Python version are you using? Do you have any PYTHON* environment variables set? Sorry for all the questions, but this is an odd exception.
I am using 3.11 Python, I don't have any versions of Python, it's also works from the command line.
Do you have exception reporting set to Always Immediately on the Debugger page of Preferences? When this option is set, Wing stops on every exception raised, even if it's handled by other code. Your example stops for me when this option is selected like it should. You probably want to use one of the other exception reporting options.