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

Permission errors on all actions #6

Closed mrpara closed 3 years ago

mrpara commented 3 years ago

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.

oskros commented 3 years ago

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

mrpara commented 3 years ago

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'

oskros commented 3 years ago

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?

mrpara commented 3 years ago

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

oskros commented 3 years ago

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