Ren'Py I'm sorry, but an uncaught exception occurred. HELP...

exacttr

Newbie
Nov 23, 2020
18
3
Hello first of all. I translated the game called Bad bobby saga into Turkish with Translator++. I am facing this issue after making all the edits. I don't know where I went wrong.

I'm sorry, but an uncaught exception occurred.

While processing the color property of style tips_top:
File "renpy/common/00start.rpy", line 79, in _init_language
renpy.change_language(language)
Exception: Color string u'ff' must be 3, 4, 6, or 8 hex digits long.

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

Full traceback:
File "C:\Games\badbobbysaga-1.0-pc\renpy\bootstrap.py", line 314, in bootstrap
renpy.main.main()
File "C:\Games\badbobbysaga-1.0-pc\renpy\main.py", line 529, in main
run(restart)
File "C:\Games\badbobbysaga-1.0-pc\renpy\main.py", line 71, in run
renpy.translation.init_translation()
File "C:\Games\badbobbysaga-1.0-pc\renpy\translation\__init__.py", line 558, in init_translation
renpy.store._init_language() # @UndefinedVariable
File "renpy/common/00start.rpy", line 79, in _init_language
renpy.change_language(language)
File "C:\Games\badbobbysaga-1.0-pc\renpy\translation\__init__.py", line 632, in change_language
renpy.style.rebuild() # @UndefinedVariable
File "style.pyx", line 795, in renpy.style.rebuild
File "style.pyx", line 788, in renpy.style.build_styles
File "style.pyx", line 709, in renpy.style.build_style
File "style.pyx", line 706, in renpy.style.build_style
File "gen/style_functions.pyx", line 757, in style_functions.color_property
File "C:\Games\badbobbysaga-1.0-pc\renpy\color.py", line 158, in __new__
raise Exception("Color string {!r} must be 3, 4, 6, or 8 hex digits long.".format(c))
Exception: Color string u'ff' must be 3, 4, 6, or 8 hex digits long.

Windows-8-6.2.9200
Ren'Py 7.3.2.320
Bad Bobby Saga 1.0
Tue Mar 01 00:33:25 2022
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,486
4,331
Hello first of all. I translated the game called Bad bobby saga into Turkish with Translator++. I am facing this issue after making all the edits. I don't know where I went wrong.

I'm sorry, but an uncaught exception occurred.

While processing the color property of style tips_top:
File "renpy/common/00start.rpy", line 79, in _init_language
renpy.change_language(language)
Exception: Color string u'ff' must be 3, 4, 6, or 8 hex digits long.

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

Full traceback:
File "C:\Games\badbobbysaga-1.0-pc\renpy\bootstrap.py", line 314, in bootstrap
renpy.main.main()
File "C:\Games\badbobbysaga-1.0-pc\renpy\main.py", line 529, in main
run(restart)
File "C:\Games\badbobbysaga-1.0-pc\renpy\main.py", line 71, in run
renpy.translation.init_translation()
File "C:\Games\badbobbysaga-1.0-pc\renpy\translation\__init__.py", line 558, in init_translation
renpy.store._init_language() # @UndefinedVariable
File "renpy/common/00start.rpy", line 79, in _init_language
renpy.change_language(language)
File "C:\Games\badbobbysaga-1.0-pc\renpy\translation\__init__.py", line 632, in change_language
renpy.style.rebuild() # @UndefinedVariable
File "style.pyx", line 795, in renpy.style.rebuild
File "style.pyx", line 788, in renpy.style.build_styles
File "style.pyx", line 709, in renpy.style.build_style
File "style.pyx", line 706, in renpy.style.build_style
File "gen/style_functions.pyx", line 757, in style_functions.color_property
File "C:\Games\badbobbysaga-1.0-pc\renpy\color.py", line 158, in __new__
raise Exception("Color string {!r} must be 3, 4, 6, or 8 hex digits long.".format(c))
Exception: Color string u'ff' must be 3, 4, 6, or 8 hex digits long.

Windows-8-6.2.9200
Ren'Py 7.3.2.320
Bad Bobby Saga 1.0
Tue Mar 01 00:33:25 2022
The line "Exception: Color string u'ff' must be 3, 4, 6, or 8 hex digits long." tells you that the hex color information is incorrect. A hex color is for instance #fff for white or #000 for black, ie 3 digits if you use the simple 3 digit notation. A color named ff or #ff won't work.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
A hex color is for instance #fff for white or #000 for black, ie 3 digits if you use the simple 3 digit notation.
More precisely, it can be "#RGB" (3), "RGBA" (4), "#RRGGBB" (6) or "#RRGGBBAA" (8) ; with "A"/"AA" being the alpha channel.
 

Meaning Less

Engaged Member
Sep 13, 2016
3,539
7,178
i guess i need to edit from script files?
Yes, here is what happened, Translator++ messed with something that wasn't supposed to be translated and that broke the game.

Either you go to the place mentioned in the error message and fix it, it should be an easy fix probably just messed with colored text string, compare with the original to see how it should be and use a "replace all" to fix everything.

Or rollback and retranslate the game but be more careful, don't let T++ touch strings that have more than just text.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
Oh, by the way...

Hello first of all. I translated the game called Bad bobby saga into Turkish with Translator++. I am facing this issue after making all the edits. I don't know where I went wrong.
Ren'Py have an . There's absolutely no need to works with the original source code to do a translation.
 

exacttr

Newbie
Nov 23, 2020
18
3
I totally just can't believe it. Translator++ only deleted 1 'f'. I added it and it's fixed. Python is very finicky. Thanks a lot for your help. I would never have made it without you.
 
  • Like
Reactions: Meaning Less