Answer the question
In order to leave comments, you need to log in
How to fix turtle error in Python?
Everything was fine. But at one fine moment, I returned to the code, launched it, and it began to swear by this error.
AttributeError: partially initialized module 'turtle' has no attribute 'Turtle' (most likely due to a circular import
import turtle
t = turtle.Turtle()
t.forward(50)
Answer the question
In order to leave comments, you need to log in
I corrected the mistake myself. In the folders for saving there were files called turtle, even some old sketches are unknown as preserved.
Removing fixed the problem.
Conclusion: do not save files with module names in python, or use long inseparable names to be sure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question