Python-100-Days
Python-100-Days copied to clipboard
Day1:练习2代码运行之后怎么报错了阿?
Traceback (most recent call last):
File "D:/oneDay-oneHundredDays————python/oneDay/turtle.py", line 1, in
同新手。 字面上说,没有给pensize?是不是少打了一行?
在 2020-02-17 13:24:16,"笑笑" [email protected] 写道:
Traceback (most recent call last): File "D:/oneDay-oneHundredDays————python/oneDay/turtle.py", line 1, in import turtle File "D:\oneDay-oneHundredDays————python\oneDay\turtle.py", line 3, in turtle.pensize(4) AttributeError: partially initialized module 'turtle' has no attribute 'pensize' (most likely due to a circular import)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
老哥解决了么
老哥解决了发一下
解决方案: 我用的是pycharm,从project界面进入external libraries->python 3.7->python 3.7->turtle.py 打开turtle.py,按照上述网站里的代码,把原变量__all__用#注释掉,再贴上新代码保存turtle.py,就可以成功import turtle画图了,希望有帮助。代码是从下面的网站找到的。 https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000123150-PyCharm-Turtle-Help-
I assume you have your code written in a file called 'turtle.py'? When you import turtle, it imports your file, not the turtle library.
Rename your file to something other than turtle.py, and your code should run fine. 从stackoverflow里找到的,可能是项目中有turtle的同名文件,导致导入的是你的文件而不是turtle库, 解决:找到重名文件并重命名就好了
Traceback (most recent call last): File "D:/oneDay-oneHundredDays————python/oneDay/turtle.py", line 1, in import turtle File "D:\oneDay-oneHundredDays————python\oneDay\turtle.py", line 3, in turtle.pensize(4) AttributeError: partially initialized module 'turtle' has no attribute 'pensize' (most likely due to a circular import)
python\oneDay\turtle.py 修改为 python\oneDay\turtle01.py 就可以了 import turtle以为倒入的是这个turtle.py 而不是库,所以报错
你的邮件已经收到,我会尽快回复。
@.***
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
这是来自QQ邮箱的自动回复邮件。已收到你的邮件 我会尽快回复你
这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
感谢您的来信,我一定会尽快回复您的
邮件已收到 会尽快查看 ——鹏
这是一封自动回复邮件。已经收到您的来信,我会尽快回复。
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
来函妥收,请君勿念,择日详复,还望见谅。
感谢您的来信,文件已收到,谢谢! Thank you for your email.I’ll disposal and reply as soon as possible.
我不在
~~郑斌斌,也就是我,已收到你的邮件~~ 我会尽快答复您的
这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
您好,黄勇评已经收到您的邮件,我会在阅读后的第一时间给您回复。
自动回复机器人开会啦~~不过为啥其他邮件没有这么多自动回复呢。
你好,我顶你个肺
顶肺
在 2021-12-09 20:45:16,"MiosrkFo" @.***> 写道:
你好,我顶你个肺
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.