Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ibaiGorordo
Copy link

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
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.

None yet

2 participants