Monika-After-Story / MonikaModDev

DDLC fan mod to extend Monika
http://www.monikaafterstory.com/
Other
1.18k stars 685 forks source link

UnicodeDecodeError #6560

Closed ghost closed 3 years ago

ghost commented 3 years ago

This is what the mod has thrown being idle in the background.

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script-ch30.rpy", line 1449, in script call
  File "game/script-ch30.rpy", line 1619, in script
  File "game/script-ch30.rpy", line 1643, in <module>
  File "game/zz_windowreacts.rpy", line 242, in mas_checkForWindowReacts
  File "game/zz_windowreacts.rpy", line 216, in mas_isInActiveWindow
  File "game/zz_windowreacts.rpy", line 185, in mas_getActiveWindow
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 54: ordinal not in range(128)

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

Full traceback:
  File "game/script-ch30.rpy", line 1449, in script call
  File "game/script-ch30.rpy", line 1619, in script
  File "/home/scpketer/<...>/renpy/ast.py", line 814, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/home/scpketer/<...>/renpy/python.py", line 1719, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script-ch30.rpy", line 1643, in <module>
  File "game/zz_windowreacts.rpy", line 242, in mas_checkForWindowReacts
  File "game/zz_windowreacts.rpy", line 216, in mas_isInActiveWindow
  File "game/zz_windowreacts.rpy", line 185, in mas_getActiveWindow
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 54: ordinal not in range(128)

Linux-5.9.1-arch1-1-x86_64-with-glibc2.2.5
Ren'Py 6.99.12.4.2187
Monika After Story 0.11.5

Seems like some of my window titles had something non-ASCII, though it worked perfectly in the past.

I did a bit of research and tried window detection code and it worked.

It also may be because of my system having LANG environment variable set to C (I messed up my install a bit) and thus having window titles encoded in ASCII, so I'm fixing it right now and I'll update if it did work.

Update: right, seems like it was the cause. Still, I think we can convert window titles to Unicode to prevent this sort of errors.

Ant9cp commented 3 years ago

This happend a few times to me too in previous versions When i say brb or i'm going to take a shower

ThePotatoGuy commented 3 years ago

Did you already push a fix for this?

ThePotatoGuy commented 3 years ago

[closing as fixed]