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

FileExistsError at installation #418

Open
jvdkwast opened this issue Aug 20, 2022 · 2 comments
Open

FileExistsError at installation #418

jvdkwast opened this issue Aug 20, 2022 · 2 comments
Labels
bug An identified bug

Comments

@jvdkwast
Copy link

What is the bug?

When I install QuickOSM from the Plugins Manager in QGIS 3.26 on Windows I get a FileExistsError. This bug was reproduced on a laptop of another user.

Couldn't load plugin 'QuickOSM' due to an error when calling its classFactory() method 

FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\hansa\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\QuickOSMTest\\python\\plugins\\QuickOSM\\resources\\i18n\\preset_cs-rCZ.po' -> 'C:\\Users\\hansa\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\QuickOSMTest\\python\\plugins\\QuickOSM\\resources\\i18n\\preset_cs_CZ.po' 
Traceback (most recent call last):
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:\Users/hansa/AppData/Roaming/QGIS/QGIS3\profiles\QuickOSMTest/python/plugins\QuickOSM\__init__.py", line 12, in classFactory
    return QuickOSMPlugin(iface)
  File "C:\Users/hansa/AppData/Roaming/QGIS/QGIS3\profiles\QuickOSMTest/python/plugins\QuickOSM\quick_osm.py", line 74, in __init__
    self.extract_zip_file()
  File "C:\Users/hansa/AppData/Roaming/QGIS/QGIS3\profiles\QuickOSMTest/python/plugins\QuickOSM\quick_osm.py", line 123, in extract_zip_file
    os.rename(file_path, new_file_path)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\Users\\hansa\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\QuickOSMTest\\python\\plugins\\QuickOSM\\resources\\i18n\\preset_cs-rCZ.po' -> 'C:\\Users\\hansa\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\QuickOSMTest\\python\\plugins\\QuickOSM\\resources\\i18n\\preset_cs_CZ.po'


Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
QGIS version: 3.26.2-Buenos Aires Buenos Aires, feec3d3b12f 

Python Path:
C:/OSGeo4W/apps/qgis/./python
C:/Users/hansa/AppData/Roaming/QGIS/QGIS3\profiles\QuickOSMTest/python
C:/Users/hansa/AppData/Roaming/QGIS/QGIS3\profiles\QuickOSMTest/python/plugins
C:/OSGeo4W/apps/qgis/./python/plugins
C:\OSGeo4W\bin\python39.zip
C:\OSGeo4W\apps\Python39\DLLs
C:\OSGeo4W\apps\Python39\lib
C:\OSGeo4W\bin
C:\OSGeo4W\apps\Python39
C:\OSGeo4W\apps\Python39\lib\site-packages
C:\OSGeo4W\apps\Python39\lib\site-packages\win32
C:\OSGeo4W\apps\Python39\lib\site-packages\win32\lib
C:\OSGeo4W\apps\Python39\lib\site-packages\Pythonwin
C:/Users/hansa/AppData/Roaming/QGIS/QGIS3\profiles\QuickOSMTest/python

Environment

  • QuickOSM version: 2.1.0
  • QGIS version: 3.26.2
  • OS: Windows
@jvdkwast jvdkwast added the bug An identified bug label Aug 20, 2022
@jvdkwast
Copy link
Author

The same happens on QGIS 3.22.10.

@Gustry
Copy link
Member

Gustry commented Aug 21, 2022

Temporary fixed, but I want to keep the ticket open to clean a little bit the code.
Commit b43c05d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An identified bug
Projects
None yet
Development

No branches or pull requests

2 participants