Unicode Decode Error

Hi.
On my personal computers, processing works like a charm. I use it in python mode.
On my school’s computers everytime i load a script or even if i save a script, when I try to run it I get this :

processing.app.SketchException: UnicodeDecodeError: ‘utf-8’ codec can’t decode bytes in position 8-10: invalid data

This is really frustrating because I’m supposed to teach my students in processing.
Would you happen to know how to circumvent this ?

Thanks in advance.
Fred

Maybe the Sketch has an unidentifyable character in it. Probably in the first line. Might be some Text like license disclaimer or similar. Try creating a new Sketch without unneccessary Text and if that works, Look at Home at a copy of the Sketch that doesn‘t Open and See what character is at positions 8-10. Or maybe line 8-10… and try removing Charakters that aren‘t needed or Look like they are not supported on all Systems.

Also, what operating Systems are we Talking about? Always the Same, or is your Home System Windows and the School System Linux? Or how is it?

Also, try looking online at UTF-8 charset. Maybe you See some characters in your code that aren’t supported.

@prof.leleu – did you resolve this problem?

This could be a caused on your work computer by a non-ASCII character in the sketch path (sketch name, account username, etc). Edit: this is the correct link:

For another past example of a similar problem, see: https://forum.processing.org/two/discussion/27074/export-compatibility

If that isn’t it, some information that would be helpful:

  1. What exact operating system version numbers are you running on your home / work computers? (are they the same?)

  2. What exact version of Processing PDE are you running on each?

  3. When you look at Python Mode in the PDE Contributions manager, what version is it?

You could also file a bug report on Processing.py Bugs or issues – I think bugs is the preferred place, although I’m not sure:

1 Like