oskros / MF_run_counter

MF run counter developed for Diablo 2. Allows users to collect stats about their run times and found items, and can track your holy grail progress
MIT License
80 stars 18 forks source link

Exception thrown during startup #15

Closed qq253498229 closed 1 year ago

qq253498229 commented 1 year ago

23:09:57,2 root ERROR 'utf-8' codec can't decode byte 0xc2 in position 2: invalid continuation byte Traceback (most recent call last): File "main.py", line 15, in File "master_frame.py", line 156, in init File "modules\mf_timer.py", line 35, in init File "modules\mf_timer.py", line 78, in _update_timers File "modules\mf_timer.py", line 93, in _update_session_time File "modules\mf_timer.py", line 90, in is_game_open File "memory_reader\reader_utils.py", line 158, in one_of_processes_exists UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 2: invalid continuation byte

oskros commented 1 year ago

Do you have chinese characters in the path where you placed the MF run counter exe?

qq253498229 commented 1 year ago

It seems not. My app path is: D:\game\mfruncounter

qq253498229 commented 1 year ago

mfruncounter.zip Here is the generate files, exclude the exe file I download on release page.

oskros commented 1 year ago

Ahh its actually the install path of diablo that might have chinese characters in it

qq253498229 commented 1 year ago

D:\game\Diablo II Resurrected

qq253498229 commented 1 year ago

There is also no Chinese.

qq253498229 commented 1 year ago

There is also no Chinese.

qq253498229 commented 1 year ago

Because I am also a programmer, I usually do not use the Chinese path for filename or path.

oskros commented 1 year ago

Hmm strange. Its just that the error is related to a decoding problem, which i assumed came from a chinese character. But I can maybe try another encoding

qq253498229 commented 1 year ago

19:12:22,83 root ERROR (<class 'UnicodeDecodeError'>, UnicodeDecodeError('utf-8', b'\xb0\xd9\xb6\xc8\xb7\xad\xd2\xeb.exe', 0, 1, 'invalid start byte'), <traceback object at 0x000002835A130080>) Traceback (most recent call last): File "tkinter__init.py", line 1883, in call File "tkinter\init__.py", line 804, in callit File "modules\mf_timer.py", line 78, in _update_timers File "modules\mf_timer.py", line 93, in _update_session_time File "modules\mf_timer.py", line 90, in is_game_open File "memory_reader\reader_utils.py", line 158, in one_of_processes_exists UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte

qq253498229 commented 1 year ago

I found that after I opened an application named "BaiduTranslate" , the MF Run Counter would crash.

qq253498229 commented 1 year ago

I found that after I opened an application named "BaiduTranslate" , the MF Run Counter would crash.

oskros commented 1 year ago

I think I might have found a solution. Can you try this updated version? mf_timer.zip

qq253498229 commented 1 year ago

Exciting! Now it can run normally!