1

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

1
  • 2
    Where did you download the cTurtle module from? Commented Oct 20, 2012 at 22:06

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

I saved the file in UTF8 and the error message disappeared

1 Comment

What file did you save as UTF-8?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.