UTF-8 error?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
detruuteron
Newbie
Posts: 4
Joined: Mon Nov 26, 2018 5:31 pm
Projects: Nighttime
Tumblr: pristinemirror
itch: detruuteron
Contact:

UTF-8 error?

#1 Post by detruuteron »

A friend of mine got this error on his game and we don't know what to do.
I'm sorry, but an uncaught exception occurred.

While parsing C:\Users\clau\Downloads\A world truly laughable/game/script.rpy.
UnicodeDecodeError: 'utf8' codec can't decode byte 0x97 in position 1168: invalid start byte

-- Full Traceback ------------------------------------------------------------

Full traceback:
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\bootstrap.py", line 313, in bootstrap
renpy.main.main()
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\main.py", line 357, in main
renpy.game.script.load_script() # sets renpy.game.script.
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\script.py", line 266, in load_script
self.load_appropriate_file(".rpyc", ".rpy", dir, fn, initcode)
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\script.py", line 732, in load_appropriate_file
data, stmts = self.load_file(dir, fn + source)
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\script.py", line 555, in load_file
stmts = renpy.parser.parse(fullfn)
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\parser.py", line 2722, in parse
lines = list_logical_lines(fn, filedata, linenumber)
File "C:\Users\clau\Downloads\renpy-7.1.3-sdk\renpy\parser.py", line 214, in list_logical_lines
data = f.read().decode("utf-8")
File "/home/tom/ab/x64lucid-deps/install/lib/python2.7/encodings/utf_8.py", line 16, in decode
UnicodeDecodeError: 'utf8' codec can't decode byte 0x97 in position 1168: invalid start byte

Windows-7-6.1.7601-SP1
Ren'Py 7.1.3.1092

Mon Jan 14 14:30:06 2019

DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: UTF-8 error?

#2 Post by DragoonHP »

Most probably the script.rpy files is stored in some encoding other thana utf-8. Make sure that whatever editor you are using to save/make changes to the script is saving the file in utf-8

Post Reply

Who is online

Users browsing this forum: Google [Bot]