This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: error in turtle.py - module
Type: Stage:
Components: Tkinter Versions: Python 2.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: glingl, loewis
Priority: normal Keywords:

Created on 2002-04-03 23:17 by glingl, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (4)
msg10141 - (view) Author: Gregor Lingl (glingl) (Python committer) Date: 2002-04-03 23:17
When trying to use the RawPen-class of turtle.py,
the following error occurs:

Python 2.2.1c2 (#33, Mar 26 2002, 13:04:18) [MSC 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license" for more
information.
IDLE 0.8 -- press F1 for help
>>> from Tkinter import *
>>> import turtle
>>> root = Tk()
>>> c = Canvas(root)
>>> c.pack()
>>> t = turtle.RawPen(c)
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in ?
    t = turtle.RawPen(c)
  File "C:\Python221c\lib\lib-tk\turtle.py", line 16,
in __init__
    self.reset()
  File "C:\Python221c\lib\lib-tk\turtle.py", line 42,
in reset
    self.clear()
  File "C:\Python221c\lib\lib-tk\turtle.py", line 53,
in clear
    self._draw_turtle()
  File "C:\Python221c\lib\lib-tk\turtle.py", line 262,
in _draw_turtle
    self._arrow = _canvas.create_line(x-dx,y+dy,x,y,
AttributeError: 'NoneType' object has no attribute
'create_line'
>>> 

This can be fixed - I suppose - by correcting  line 262:

    self._arrow = self._canvas.create_line(x-dx, ...etc.

msg10142 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-04-04 07:07
Logged In: YES 
user_id=21627

This was fixed through patch #536117.
msg10143 - (view) Author: Gregor Lingl (glingl) (Python committer) Date: 2002-04-04 10:58
Logged In: YES 
user_id=505031

Cannot find patch #536117
When was it fixed?

In python2.2.1c2 it's definitely not fixed

Gregor Lingl
msg10144 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-04-04 15:57
Logged In: YES 
user_id=21627

You can find the patch at http://python.org/sf/536117
As you can see from the patch discussion, it was committed
as turtle.py 1.6, so the fix will be released with Python 2.3.

The patch might be considered for inclusion in Python 2.2.2
as well.
History
Date User Action Args
2022-04-10 16:05:11adminsetgithub: 36374
2002-04-03 23:17:38glinglcreate