WhereGroup / profile-manager

https://plugins.qgis.org/plugins/profile-manager/
MIT License
3 stars 3 forks source link

Plugin crashes if "default" QGIS profile doesn't exist #9

Open sigeal opened 6 months ago

sigeal commented 6 months ago

Title says it all.

Stack trace :

ValueError: 'default' is not in list 
Traceback (most recent call last):
  File "/home/user/.local/share/QGIS/QGIS3/profiles/complet/python/plugins/profile-manager/profile_manager.py", line 234, in run
    self.interface_handler.init_profile_selection()
  File "/home/user/.local/share/QGIS/QGIS3/profiles/complet/python/plugins/profile-manager/userInterface/interface_handler.py", line 79, in init_profile_selection
    self.dlg.comboBoxNamesSource.setCurrentIndex(profile_names.index(profile))
ValueError: 'default' is not in list

Version de Python : 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] 
Version de QGIS : 3.28.4-Firenze Firenze, 6f669a22ac 

This issue is caused by line 79 in userInterface/interface_handler.py trying to set source profile combobox to "default" profile index, failing if "default" profile doesn't exist. Clean up and fixes Pull Request solves this issue.