LearnToCodeRPG icon indicating copy to clipboard operation
LearnToCodeRPG copied to clipboard

Exception due to KeyError missing text

Open johanneswerner opened this issue 2 years ago • 1 comments

What bug did you encounter?

At the scene with the client Stacy and Lucy's, when agreeing to the shorter deadline, the exception as described in additional notes occurs.

I am running version 1.5 under Manjaro Linux.

Steps to Reproduce

Select at that step "Sure. I've been getting more comfortable in my duties here. ..."

Then the exception with the KeyError missing text? occurs.

Screenshots

No response

Additional Information

[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 2047, in script call
    call v2_routine from _call_v2_routine
  File "game/scripts/labels/day_activity_choices.rpy", line 490, in script call
    python:
  File "game/scripts/labels/v2_story.rpy", line 58, in script call
    call v2_working_late_sad_path from _call_v2_working_late_sad_path_2
  File "game/scripts/labels/v2_story.rpy", line 64, in script
    oliver @ smile "Just let me know if you have any questions. I'll shoot you the information on the project when [missing text?]"
KeyError: 'missing text?'

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

Full traceback:
  File "game/script.rpy", line 2047, in script call
    call v2_routine from _call_v2_routine
  File "game/scripts/labels/day_activity_choices.rpy", line 490, in script call
    python:
  File "game/scripts/labels/v2_story.rpy", line 58, in script call
    call v2_working_late_sad_path from _call_v2_working_late_sad_path_2
  File "game/scripts/labels/v2_story.rpy", line 64, in script
    oliver @ smile "Just let me know if you have any questions. I'll shoot you the information on the project when [missing text?]"
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/ast.py", line 921, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/exports.py", line 1373, in say
    who(what, *args, **kwargs)
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/character.py", line 1253, in __call__
    what = self.prefix_suffix("what", self.what_prefix, what, self.what_suffix)
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/character.py", line 1172, in prefix_suffix
    return (sub(prefix) + sub(body) + sub(suffix))
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/character.py", line 1152, in sub
    return renpy.substitutions.substitute(s, scope=scope, force=force, translate=translate)[0]
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/substitutions.py", line 278, in substitute
    s = formatter.vformat(s, (), kwargs) # type: ignore
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/string.py", line 165, in vformat
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/string.py", line 205, in _vformat
  File "/home/johannes/game/LearnToCodeRPG-1.5-linux/renpy/substitutions.py", line 168, in get_field
    obj, arg_used = super(Formatter, self).get_field(field_name, args, kwargs)
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/string.py", line 270, in get_field
  File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/string.py", line 227, in get_value
KeyError: 'missing text?'

Linux-6.0.15-1-MANJARO-x86_64-with-glibc2.36 x86_64
Ren'Py 8.0.3.22090809
Learn to Code RPG 1.5
Tue Jan  3 12:54:30 2023
[/code]

johanneswerner avatar Jan 03 '23 12:01 johanneswerner

https://www.renpy.org/doc/html/text.html

I can at least see why. It's literal missing text. There's supposed to be a name variable from the global store I believe or maybe an issue occurred when generating the translations. Regardless the [missing text] needs to be replaced. Very good eye.

https://github.com/freeCodeCamp/LearnToCodeRPG/blob/38c8c8e868ae830945832d275d7b483967fb4c6d/game/scripts/labels/v2_story.rpy#L64

a2937 avatar Jan 20 '23 01:01 a2937