You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a problem with the temporary file created with tempfile.NamedTemporaryFile in greatfet_logic.py as during the zip processing there will be a permission error like below
File "c:\users\mozor\appdata\local\programs\python\python38\lib\zipfile.py", line 1775, in write
with open(filename, "rb") as src, self.open(zinfo, 'w') as dest:
PermissionError: [Errno 13] Permission denied: 'D:\Work\tmpuxen_7_e'
The command prompt used is ran as administrator, there is no read only or write permissions issues on the Work folder. There are many users on the web that have issues with the handling of temporary file through that library with different proposed solutions.
A quick patch that worked for me was to replace the temporary file creation with
#bin_file = tempfile.NamedTemporaryFile(mode='w+b', suffix=".zip", dir=holding_dir)
bin_file = open(holding_dir + "\temp.zip", 'w+b')
of course the file is not temporary anymore but manually creating the file like this won't issue any permission errors.
The text was updated successfully, but these errors were encountered:
Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later)
Not sure if there is a benefit to using NamedTemporaryFile this way, but I've modified the code as such:
There seems to be a problem with the temporary file created with tempfile.NamedTemporaryFile in greatfet_logic.py as during the zip processing there will be a permission error like below
File "c:\users\mozor\appdata\local\programs\python\python38\lib\zipfile.py", line 1775, in write
with open(filename, "rb") as src, self.open(zinfo, 'w') as dest:
PermissionError: [Errno 13] Permission denied: 'D:\Work\tmpuxen_7_e'
The command prompt used is ran as administrator, there is no read only or write permissions issues on the Work folder. There are many users on the web that have issues with the handling of temporary file through that library with different proposed solutions.
A quick patch that worked for me was to replace the temporary file creation with
#bin_file = tempfile.NamedTemporaryFile(mode='w+b', suffix=".zip", dir=holding_dir)
bin_file = open(holding_dir + "\temp.zip", 'w+b')
of course the file is not temporary anymore but manually creating the file like this won't issue any permission errors.
The text was updated successfully, but these errors were encountered: