oskros/MF_run_counter

Permission errors on all actions

mrpara opened this issue · 5 comments

Whenever I try to do anything with the run counter, whether it is to start a new run or even try to close it, in most cases it will crash. It is impossible to keep it open for more than ~20 seconds. Here is the traceback:
21:03:25,450 root ERROR (<class 'PermissionError'>, PermissionError(13, 'The process cannot access the file because it is being used by another process.', None, 32), <traceback object at 0x000002B61EFC9F80>)
Traceback (most recent call last):
File "tkinter_init_.py", line 1883, in call
File "tkinter_init_.py", line 804, in callit
File "master_frame.py", line 460, in autosave_state
File "master_frame.py", line 541, in SaveActiveState
File "modules\grail.py", line 169, in save_grail
File "utils\other_utils.py", line 57, in atomic_json_dump
File "contextlib.py", line 120, in exit
File "site-packages\atomicwrites_init
.py", line 169, in open
File "site-packages\atomicwrites_init
.py", line 202, in commit
File "site-packages\atomicwrites_init_.py", line 99, in replace_atomic
File "site-packages\atomicwrites_init_.py", line 79, in replace_atomic
File "site-packages\atomicwrites_init
.py", line 76, in _handle_errors
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process.

I am running both the game and the run counter as admin. Using win10.

can you try version 1.4.7 to see if that works for you?

Didn't work. The counter stayed alive long enough to finish one duriel run, and then crashed a few seconds after starting the second one.

01:59:34,745 root ERROR (<class 'PermissionError'>, PermissionError(13, 'The process cannot access the file because it is being used by another process'), <traceback object at 0x000002954828AF00>)
Traceback (most recent call last):
File "tkinter_init_.py", line 1883, in call
File "tkinter_init_.py", line 804, in callit
File "main_frame.py", line 462, in _autosave_state
File "main_frame.py", line 542, in SaveActiveState
File "modules\grail.py", line 170, in save_grail
File "utils\other_utils.py", line 60, in atomic_json_dump
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'Profiles/grail_tmp.json' -> 'Profiles/grail.json'

Sorry that I didn't get back to you yet. Haven't heard of anyone else having this issue - I am a bit dumbfounded on why it is happening. Have you by any chance had the .json file open in an editor at the same time, or perhaps accidentally ran two instances of the MF counter at the same time?

Looks like the issue was that the .exe was in a dropbox folder. Moving it somewhere else seemingly solved the issue.

Good to know, will put that in troubleshooting. Makes sense since Dropbox will constantly sync files and that then clashes with periodic saving of the app. But I guess proper solution would be to save files elsewhere than the exe location, e.g. user files. Closing the issue though