# Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.

Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
 It is currently Sat May 25, 2013 4:30 am

 All times are UTC - 5 hours [ DST ]

### Forum rules

Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.

 Page 1 of 1 [ 14 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Problems with ASCII codec and "ñ" [Solved]Posted: Sun Jul 15, 2012 7:08 pm
 Eileen-Class Veteran

Joined: Fri Jun 05, 2009 3:31 am
Posts: 1596
Location: Illinois, USA
Projects: Twelve
Organization: Kitsch-soft
I'm trying to use the tilde n character with bad results. The game will run fine, but Ren'Py can't compile it. It's spitting this back at me:

Code:
I'm sorry, but an uncaught exception occurred.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 2: ordinal not in range(128)

While running game code:
- script at line 28 of renpy-6.11.0/launcher/distribute.rpy
- python at line 168 of renpy-6.11.0/launcher/distribute.rpy.

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

File "C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0\renpy\bootstrap.py", line 252, in bootstrap
File "C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0\renpy\main.py", line 310, in main
File "C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0\renpy\main.py", line 93, in run
File "C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0\renpy\execution.py", line 250, in run
File "C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0\renpy\ast.py", line 567, in execute
File "C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0\renpy\python.py", line 957, in py_exec_bytecode
File "renpy-6.11.0/launcher/distribute.rpy", line 168, in <module>
File "distribute.py", line 332, in distribute
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 2: ordinal not in range(128)

While running game code:
- script at line 28 of renpy-6.11.0/launcher/distribute.rpy
- python at line 168 of renpy-6.11.0/launcher/distribute.rpy.

Ren'Py Version: Ren'Py 6.11.0l

So after searching the forum, I went back in and made sure my script.rpy and options.rpy files were encoded in UTF-8, and put "u" in front of all the strings containing the tilde n. Then I tried to launch the game. The game couldn't even launch and complained about the strings preceded by the u... OTL

Code:
On line 312 of C:\Documents and Settings\Sapphicatific\My Documents\1 NTFS\LostFiles1\Owner\Desktop\Senor Volky McLupinstein and the League of Extraordinary Dentists/game/script.rpy: expected statement.
v u"Holy CATS!  Whatchu cryin' for, Señorita?!"
^

On line 545 of C:\Documents and Settings\Sapphicatific\My Documents\1 NTFS\LostFiles1\Owner\Desktop\Senor Volky McLupinstein and the League of Extraordinary Dentists/game/script.rpy: expected statement.
n u"Not so fast, Señor Volky McLupinstein."
^

On line 871 of C:\Documents and Settings\Sapphicatific\My Documents\1 NTFS\LostFiles1\Owner\Desktop\Senor Volky McLupinstein and the League of Extraordinary Dentists/game/script.rpy: expected statement.
u"When the smoke cleared... all that was left was a blown-out dentist's office, a little talking balloon, and Señor Volky McLupinstein."
^

It was apparently fine with this one:
Code:
$v = Character(u'Señor Volky McLupinstein', color="#30C121") So, what am I missing here? _________________ “When I stand before God at the end of my life, Aspiring writer-artist. I would hope that I would not have a single bit of talent left, and could say, 'I used everything you gave me.'” — Erma Bombeck ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬ Works in Progress Twelve - love story of an A.I. and her programmer PAW ★ PRINTS - Laika in the Space with Tetris Last edited by Sapphi on Thu Jul 19, 2012 6:16 pm, edited 1 time in total. Top  Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 7:31 pm  Veteran Joined: Mon Aug 09, 2010 10:02 pm Posts: 237 Location: California, USA Projects: Eastern Starlight Romance, Touhou Mecha Organization: Dai-Sukima Dan Have you tried making your files UTF-8, but *not* preceding your script strings with u? That's what I've been doing for non-ASCII characters in the script. _________________ Dai-Sukima Dan blog Top  Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 8:06 pm  Eileen-Class Veteran Joined: Fri Jun 05, 2009 3:31 am Posts: 1596 Location: Illinois, USA Projects: Twelve Organization: Kitsch-soft SleepKirby wrote: Have you tried making your files UTF-8, but *not* preceding your script strings with u? That's what I've been doing for non-ASCII characters in the script. I just tried that with no success. I still get the same error when trying to build the distribution. _________________ “When I stand before God at the end of my life, Aspiring writer-artist. I would hope that I would not have a single bit of talent left, and could say, 'I used everything you gave me.'” — Erma Bombeck ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬ Works in Progress Twelve - love story of an A.I. and her programmer PAW ★ PRINTS - Laika in the Space with Tetris Top  Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 8:16 pm  Ren'Py Creator Joined: Mon Feb 02, 2004 10:58 am Posts: 10780 Location: Kings Park, NY Completed: Moonlight Walks Projects: Ren'Py Do you have "ñ" in a filename? That's not supported in the zip file format. _________________ Another Old-Fashioned Bishoujo Gamer Supporting creators since 2004; Code > Drama (When was the last time you backed up your game?) "It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt Top  Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 8:55 pm  Eileen-Class Veteran Joined: Fri Jun 05, 2009 3:31 am Posts: 1596 Location: Illinois, USA Projects: Twelve Organization: Kitsch-soft PyTom wrote: Do you have "ñ" in a filename? That's not supported in the zip file format. Nope, nowhere... (I actually tried to do that before, but it caused an error, so I had to change it.) _________________ “When I stand before God at the end of my life, Aspiring writer-artist. I would hope that I would not have a single bit of talent left, and could say, 'I used everything you gave me.'” — Erma Bombeck ▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬ Works in Progress Twelve - love story of an A.I. and her programmer PAW ★ PRINTS - Laika in the Space with Tetris Top  Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 9:04 pm  Ren'Py Creator Joined: Mon Feb 02, 2004 10:58 am Posts: 10780 Location: Kings Park, NY Completed: Moonlight Walks Projects: Ren'Py Try a non-ancient Ren'Py, then. There have been a lot of improvements to how we handle international filenames in the latter part of 6.13. It's tough to support a version of Ren'Py that's 2 years old. _________________ Another Old-Fashioned Bishoujo Gamer Supporting creators since 2004; Code > Drama (When was the last time you backed up your game?) "It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt Top  Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 9:06 pm  Crawling Chaos Joined: Mon Feb 13, 2012 5:37 am Posts: 1118 Location: Kimashi Tower, Japan Completed: SMAR,AAA Projects: DMC$renpy.say("v", u"Holy CATS! Whatchu cryin' for, Señorita?!")
I think u"" can only work inside of a python block

_________________

Top

 Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 9:10 pm
 Ren'Py Creator

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10780
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
The bug isn't in the game proper. It's in the name of a file or directory on disk. That's what distribute.rpy deals with - it doesn't look at the game proper.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt

Top

 Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 9:21 pm
 Eileen-Class Veteran

Joined: Fri Jun 05, 2009 3:31 am
Posts: 1596
Location: Illinois, USA
Projects: Twelve
Organization: Kitsch-soft
PyTom wrote:
Try a non-ancient Ren'Py, then. There have been a lot of improvements to how we handle international filenames in the latter part of 6.13.

It's tough to support a version of Ren'Py that's 2 years old.

I forgot about this... I had previously downloaded a newer version but I think I mistook the graphical problems I was experiencing in the newer version as proof that my computer wasn't good enough to run it, so I went back and dug up 6.11. After I found out all I needed to do was the SHIFT+open and change settings method, I guess I forgot to go back and get the new one again... how embarrassing, lol.

nyaatrap wrote:
\$renpy.say("v", u"Holy CATS! Whatchu cryin' for, Señorita?!")
I think u"" can only work inside of a python block

Hmm.. I tried your suggestion with high hopes, but it still spit the same error back at me. Which makes me pretty nervous, because I'm starting to wonder if it isn't something else. But I'm going to try downloading the latest version and see where it goes from there.

_________________
“When I stand before God at the end of my life,
Aspiring writer-artist.

I would hope that I would not have a single bit of talent left,
and could say, 'I used everything you gave me.'”
— Erma Bombeck

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬
Works in Progress
Twelve - love story of an A.I. and her programmer
PAW ★ PRINTS - Laika in the Space with Tetris

Top

 Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 9:49 pm
 Ren'Py Creator

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10780
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
As a question, is there an ñ anywhere in the path?

For example, could Ren'Py be in C:\Users\Your ñame\renpy-6.11.1\... ?

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt

Top

 Post subject: Re: Problems with ASCII codec and "ñ"Posted: Sun Jul 15, 2012 10:20 pm
 Eileen-Class Veteran

Joined: Fri Jun 05, 2009 3:31 am
Posts: 1596
Location: Illinois, USA
Projects: Twelve
Organization: Kitsch-soft
PyTom wrote:
As a question, is there an ñ anywhere in the path?

For example, could Ren'Py be in C:\Users\Your ñame\renpy-6.11.1\... ?

Ren'Py is here:
C:\Documents and Settings\Sapphicatific\Desktop\renpy-6.11.0

And the game is here:
C:\Documents and Settings\Sapphicatific\My Documents\1 NTFS\LostFiles1\Owner\Desktop\Senor Volky McLupinstein and the League of Extraordinary Dentists\game

_________________
“When I stand before God at the end of my life,
Aspiring writer-artist.

I would hope that I would not have a single bit of talent left,
and could say, 'I used everything you gave me.'”
— Erma Bombeck

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬
Works in Progress
Twelve - love story of an A.I. and her programmer
PAW ★ PRINTS - Laika in the Space with Tetris

Top

 Post subject: Re: Problems with ASCII codec and "ñ"Posted: Wed Jul 18, 2012 8:16 pm
 Eileen-Class Veteran

Joined: Fri Jun 05, 2009 3:31 am
Posts: 1596
Location: Illinois, USA
Projects: Twelve
Organization: Kitsch-soft
Update time...
Well, Nyaatrap's method worked, but I wasn't sure how to implement the font colors for the Characters speaking so I went back to trying just the u prefix on the say strings. Had to take them off again because RenPy 6.13 still doesn't like them. It doesn't crash upon launch this time, but it complains as soon as I get to the offending line. Since the problem at hand seems to be greater than this, though, I just tried to compile the game again to see what the result would be.

The result:
Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "launcher/distribute.rpy", line 28, in script
File "launcher/distribute.rpy", line 66, in python
File "launcher/interface.rpy", line 283, in python
File "launcher/interface.rpy", line 156, in python
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 2: ordinal not in range(128)

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

Full traceback:
File "C:\Documents and Settings\Sapphicatific\My Documents\renpy-6.13.12\renpy\execution.py", line 265, in run
File "C:\Documents and Settings\Sapphicatific\My Documents\renpy-6.13.12\renpy\ast.py", line 632, in execute
File "C:\Documents and Settings\Sapphicatific\My Documents\renpy-6.13.12\renpy\python.py", line 972, in py_exec_bytecode
File "launcher/distribute.rpy", line 66, in <module>
File "launcher/interface.rpy", line 283, in text_variable
File "launcher/interface.rpy", line 156, in small_button
File "C:\Documents and Settings\Sapphicatific\My Documents\renpy-6.13.12\renpy\ui.py", line 435, in __call__
File "C:\Documents and Settings\Sapphicatific\My Documents\renpy-6.13.12\renpy\text\text.py", line 1035, in __init__
File "C:\Documents and Settings\Sapphicatific\My Documents\renpy-6.13.12\renpy\text\text.py", line 1080, in set_text
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 2: ordinal not in range(128)

Windows-XP-5.1.2600-SP3
Ren'Py 6.13.12.1728

_________________
“When I stand before God at the end of my life,
Aspiring writer-artist.

I would hope that I would not have a single bit of talent left,
and could say, 'I used everything you gave me.'”
— Erma Bombeck

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬
Works in Progress
Twelve - love story of an A.I. and her programmer
PAW ★ PRINTS - Laika in the Space with Tetris

Top

 Post subject: Re: Problems with ASCII codec and "ñ"Posted: Thu Jul 19, 2012 6:15 pm
 Eileen-Class Veteran

Joined: Fri Jun 05, 2009 3:31 am
Posts: 1596
Location: Illinois, USA
Projects: Twelve
Organization: Kitsch-soft
So today, seeing as how this seemed to be an unsolvable mystery, I decided to just create a new project and copy my old script file and assets into it. Ren'Py compiled it without a problem.

Given that I did not have any files or folders with weird characters in them, the only thing I can think of that must have been causing my problem is that my prior attempt at giving the game folder a filename containing "ñ" (and then reverting back) must have somehow set the Ren'Py world askew. I didn't do it in the correct fashion (changing it at just-before-build stage) but did it by changing the name of the original game folder and then re-directing where the script.rpy and options.rpy were saved. Since that is apparently unsupported, Ren'Py would not compile it, so I went back and changed the name of the folder again. However, I kept getting the same error. I did not know for sure if the error was from this tampering, though, because I had not tried to compile with the original "ñ"-less name until after I already tried it with the "ñ". Could it have been remembering the "ñ"? It's a mystery...

Anyway, in the future I will try my best to play by the rules and not cause the next Compiling Apocalypse, lol!

Thanks for troubleshooting with me and I hope this helps someone in the future

_________________
“When I stand before God at the end of my life,
Aspiring writer-artist.

I would hope that I would not have a single bit of talent left,
and could say, 'I used everything you gave me.'”
— Erma Bombeck

▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬
Works in Progress
Twelve - love story of an A.I. and her programmer
PAW ★ PRINTS - Laika in the Space with Tetris

Top

 Post subject: Re: Problems with ASCII codec and "ñ" [Solved]Posted: Fri Jul 20, 2012 4:55 am
 Veteran

Joined: Mon Aug 09, 2010 10:02 pm
Posts: 237
Location: California, USA
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Huh, so one of those things. I've had that happen before with other kinds of problems, where compiling anew just fixed the problem - though instead of copying my scripts and assets over to a new folder, I just deleted all the .rpyc's and bytecode.rpyb from the /game folder, and then ran the game again (so those files all got the chance to re-generate).

Anyway, glad to hear the problem's solved.

_________________
Dai-Sukima Dan blog

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 14 posts ]

 All times are UTC - 5 hours [ DST ]

#### Who is online

Users browsing this forum: Beckers, xela

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 Search for:
Protected by Anti-Spam ACP