Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turtle module does not work #87697

Closed
aledeaux mannequin opened this issue Mar 17, 2021 · 6 comments
Closed

Turtle module does not work #87697

aledeaux mannequin opened this issue Mar 17, 2021 · 6 comments
Labels
3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@aledeaux
Copy link
Mannequin

aledeaux mannequin commented Mar 17, 2021

BPO 43531
Nosy @terryjreedy, @mdickinson

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2021-03-17.16:26:11.017>
created_at = <Date 2021-03-17.16:06:02.112>
labels = ['invalid', 'type-bug', 'library', '3.10']
title = 'Turtle module does not work'
updated_at = <Date 2021-03-17.18:35:23.000>
user = 'https://bugs.python.org/aledeaux'

bugs.python.org fields:

activity = <Date 2021-03-17.18:35:23.000>
actor = 'aledeaux'
assignee = 'none'
closed = True
closed_date = <Date 2021-03-17.16:26:11.017>
closer = 'mark.dickinson'
components = ['Library (Lib)']
creation = <Date 2021-03-17.16:06:02.112>
creator = 'aledeaux'
dependencies = []
files = []
hgrepos = []
issue_num = 43531
keywords = []
message_count = 6.0
messages = ['388931', '388933', '388934', '388936', '388944', '388956']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'mark.dickinson', 'aledeaux']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue43531'
versions = ['Python 3.10']

@aledeaux
Copy link
Mannequin Author

aledeaux mannequin commented Mar 17, 2021

So when I try to do the command "import turtle" all I get back is:

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    import turtle
  File "/Users/Virsatech/Documents/turtle.py", line 2, in <module>
    t = turtle.Pen()
AttributeError: partially initialized module 'turtle' has no attribute 'Pen' (most likely due to a circular import)

that error exactly. And I have tried many times. Anyone know how to fix?

@aledeaux aledeaux mannequin assigned terryjreedy Mar 17, 2021
@aledeaux aledeaux mannequin added topic-IDLE 3.10 only security fixes type-bug An unexpected behavior, bug, or error labels Mar 17, 2021
@aledeaux aledeaux mannequin assigned terryjreedy Mar 17, 2021
@aledeaux aledeaux mannequin added topic-IDLE 3.10 only security fixes type-bug An unexpected behavior, bug, or error labels Mar 17, 2021
@mdickinson
Copy link
Member

You have a local file named turtle.py, which is conflicting with the standard library turtle module. Rename your local file to something else, then you'll be able to import the standard library turtle module.

@aledeaux
Copy link
Mannequin Author

aledeaux mannequin commented Mar 17, 2021

Oh, OK. I am not an expert on python so I did not understand the error. Thanks for the help, and I will update you if the problems continue.

@aledeaux
Copy link
Mannequin Author

aledeaux mannequin commented Mar 17, 2021

That fixed it.

@terryjreedy
Copy link
Member

For next time, the turtle module is not part of IDLE.

@terryjreedy terryjreedy added stdlib Python modules in the Lib dir and removed topic-IDLE labels Mar 17, 2021
@terryjreedy terryjreedy removed their assignment Mar 17, 2021
@terryjreedy terryjreedy added stdlib Python modules in the Lib dir and removed topic-IDLE labels Mar 17, 2021
@terryjreedy terryjreedy removed their assignment Mar 17, 2021
@aledeaux
Copy link
Mannequin Author

aledeaux mannequin commented Mar 17, 2021

OK.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants