lharri73 / PySimlink

Compile, run, and interact with Simulink models natively in Python. https://lharri73.github.io/PySimlink/
GNU General Public License v3.0
15 stars 4 forks source link

msvcrt.locking permission denied #17

Open valentinpreda opened 6 months ago

valentinpreda commented 6 months ago

Trying to compile a model on a Window 10 machine using Python 3.12.2 but the following error gets thrown:

File "C:\temp\.venv\Lib\site-packages\pysimlink\lib\model.py", line 130, in _unlock rv = msvcrt.locking(f.fileno(), msvcrt.LK_UNLCK, 1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 13] Permission denied

Commenting out line 71 self._lock() and 83 self._unlock() in model.py fixes the issue.

Thandre commented 3 months ago

I had the same error on Windows 10 and Python 3.9.9. This seems to be a more general issue.