spitfiredd
spitfiredd

Reputation: 3125

Python: cTurtle module not loading

Help I can't get cTurtle to load. I get the following error

>>> import cTurtle
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    import cTurtle
TypeError: source code string cannot contain null bytes

I have saved the module in the following dir: C:\Python33\Lib\site-packages

Is there something else I am missing, sorry if this is a really newb question but I'd like to play around with the module. I am using python 3.3.

Thanks

Upvotes: 1

Views: 3242

Answers (2)

mrSpriceMan
mrSpriceMan

Reputation: 1

I saved the file in UTF8 and the error message disappeared

Upvotes: 0

Fredrik Hedman
Fredrik Hedman

Reputation: 11

Error seen with python3.3 but not with python3.2.

For some reason line 41 of cTurtle.py contains a NULL-charachter at the end of the line:

$ od -t a cTurtle.py.orig | grep -i nul

0003360    -   -   -   -  sp   c   T   u   r   t   l   e   .   p   y nul

Remove the NULL-character and the module should work fine.

Upvotes: 1

Related Questions