Skip to content

Update Config.py to fix permission denied error in Windows#21

Open
ibaiGorordo wants to merge 1 commit intoTuroad:mainfrom
ibaiGorordo:patch-2
Open

Update Config.py to fix permission denied error in Windows#21
ibaiGorordo wants to merge 1 commit intoTuroad:mainfrom
ibaiGorordo:patch-2

Conversation

@ibaiGorordo
Copy link
Copy Markdown

Modified the Config.py script like in the official mmcv library (https://github.com/open-mmlab/mmcv/blob/master/mmcv/utils/config.py) to fix the permission denied error in Windows when trying to copy the config file into a temporary file.

Original error:

File "lanedet\lanedet\utils\config.py", line 104, in _file2dict
    shutil.copyfile(filename,
File "...\lib\shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\...\\AppData\\Local\\Temp\\tmpno0r6u65\\tmpaiil70ev.py'

Modified the Config.py script like in the official mmcv library (https://github.com/open-mmlab/mmcv/blob/master/mmcv/utils/config.py) to fix the permission denied error in Windows when trying to copy the config file into a temporary file.

Original error:
```
  File "lanedet\lanedet\utils\config.py", line 104, in _file2dict
    shutil.copyfile(filename,
  File "...\lib\shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\...\\AppData\\Local\\Temp\\tmpno0r6u65\\tmpaiil70ev.py'
```
@Turoad
Copy link
Copy Markdown
Owner

Turoad commented Sep 13, 2021

Thanks a lot. I will test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants