Python Forum

Full Version: [split] Name error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have this code but but when I Debug error as bellow:
import turtle
Code:
wn = turtle.Screen()
wn.bgcolor()
wn.title('face of a clock')

clock = turtle.Turtle()
clock.speed(0)
clock.fd(100)

wn.mainloop()

==> Error:
================= RESTART: C:\Users\LAPTOP TL\Desktop\ss.py =================
Traceback (most recent call last):
File "C:\Users\LAPTOP TL\Desktop\ss.py", line 1, in <module>
import turtle
File "<frozen importlib._bootstrap>", line 980, in _find_and_load
File "<frozen importlib._bootstrap>", line 148, in __enter__
File "<frozen importlib._bootstrap>", line 174, in _get_module_lock
File "<frozen importlib._bootstrap>", line 59, in __init__
File "<frozen importlib._bootstrap>", line 59, in __init__
File "C:\Users\LAPTOP TL\AppData\Local\Programs\Python\Python37-32\lib\bdb.py", line 88, in trace_dispatch
return self.dispatch_line(frame)
File "C:\Users\LAPTOP TL\AppData\Local\Programs\Python\Python37-32\lib\bdb.py", line 112, in dispatch_line
self.user_line(frame)
File "C:\Users\LAPTOP TL\AppData\Local\Programs\Python\Python37-32\lib\idlelib\debugger.py", line 24, in user_line
self.gui.interaction(message, frame)
AttributeError: '_ModuleLock' object has no attribute 'name'
[DEBUG ON]

Pls help me handle its. Thanks ALl
did you name your program file turtle.py ?
If so, rename it.
according to traceback the file name is ss.py Maybe there is other file names turtle.py in the same folder?
(Sep-01-2019, 12:32 PM)buran Wrote: [ -> ]according to traceback the file name is ss.py Maybe there is other file names turtle.py in the same folder?
Thank you for help to me so much!

i have changed 'name' already but still error when i Debuge appeared error: KeyError:'turtle' affter step continue to line 59 stop can not step and appear error: "AttributeError: '_ModuleLock' object has no attribute 'name'"
Do you have Idea for this instance ? Thanks you

(Sep-01-2019, 12:27 PM)ThomasL Wrote: [ -> ]did you name your program file turtle.py ? If so, rename it.
Hi ThomasL !
i have set new name agian but anything changed still appear this error.
Do you have other Idea for Me? Thank you