app-state.py error
rsp34 opened this issue · 4 comments
rsp34 commented
I keep getting this error:
=================================================================================================================================================================================================================
MATLAB can be accessed at:
http://127.0.0.1:49924/matlab?mwi_auth_token=REMOVED
=================================================================================================================================================================================================================
INFO:MATLABProxyApp:Resetting cached config information...
INFO:MATLABProxyApp:Deleting any cached config files!
Traceback (most recent call last):
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app_state.py", line 189, in init_licensing
licensing = cached_data["licensing"]
KeyError: 'licensing'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\REMOVED\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\REMOVED\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\REMOVED\drive-designer\.venv\Scripts\matlab-proxy-app.exe\__main__.py", line 7, in <module>
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app.py", line 858, in main
app = configure_and_start(app)
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app.py", line 790, in configure_and_start
loop.run_until_complete(start_background_tasks(app))
File "C:\Users\REMOVED\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app.py", line 721, in start_background_tasks
await license_init(app)
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app.py", line 693, in license_init
await state.init_licensing()
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app_state.py", line 242, in init_licensing
self.__reset_and_delete_cached_config()
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app_state.py", line 128, in __reset_and_delete_cached_config
self.__delete_cached_config_file()
File "C:\Users\REMOVED\drive-designer\.venv\lib\site-packages\matlab_proxy\app_state.py", line 119, in __delete_cached_config_file
os.remove(self.__get_cached_config_file())
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\REMOVED\\.matlab\\MWI\\hosts\\0655-L\\proxy_app_config.json'
INFO:MATLABProxyApp:Found MATLAB executable at: C:\Program Files\MATLAB\R2023b\bin\matlab.EXE
INFO:MATLABProxyApp:MATLAB root path: C:\Program Files\MATLAB\R2023b exists, continuing to verify its validity...
INFO:MATLABProxyApp:Using 600 seconds as the default timeout value
INFO:MATLABProxyApp:
diningPhilosopher64 commented
Hi @rsp34,
Thank you for trying the MATLAB Integration for Jupyter.
This can happen when another matlab-proxy-app process has locked the config file which is leading to a PermissionError. Check the Task Manager to stop all running matlab-proxy-app processes.
As an alternative solution, you can restart your system and then try again.
rsp34 commented
There was only one matlab-proxy-app process running in task manager. I have restarted my system multiple times and this error persists. Is there anything else I can try?
diningPhilosopher64 commented
Can you navigate to C:\\Users\\REMOVED\\.matlab\\MWI\\hosts\\0655-L and delete the file and try again.
rsp34 commented
I delete the file and everything seems to be working. Thank you!