Skip to main content
edited tags
Link
PolyGeo
  • 65.5k
  • 29
  • 115
  • 353
Tweeted twitter.com/StackGIS/status/1231504164494151683
Became Hot Network Question
added 2 characters in body
Source Link
Kadir Şahbaz
  • 78.6k
  • 57
  • 260
  • 407

toTo organize better the code in my QGIS 3 Plugin, I tried to put all dialogs in one package called dialogs, but when I open QGIS it says ModuleNotFoundError: No module named 'dialogs'

This is the code I used to import the Dialog class in the "main" file, where there's run method (luniPlugin.pyluniPlugin.py in this case)

from dialogs.select_feature_dialog import SelectFeatureDialog 

(and the same for the others dialogs)

This is the folder where the project is:

enter image description here

And, finally, this is the content of the folder "dialogs":

enter image description here

Since python compiler has not given me errors, I'm wondering if it's possible to do this "unpacking" in a QGIS Plugin or if it's simple my mistake.

to organize better the code in my QGIS 3 Plugin, I tried to put all dialogs in one package called dialogs, but when I open QGIS it says ModuleNotFoundError: No module named 'dialogs'

This is the code I used to import the Dialog class in the "main" file, where there's run method (luniPlugin.py in this case)

from dialogs.select_feature_dialog import SelectFeatureDialog 

(and the same for the others dialogs)

This is the folder where the project is:

enter image description here

And, finally, this is the content of the folder "dialogs":

enter image description here

Since python compiler has not given me errors, I'm wondering if it's possible to do this "unpacking" in a QGIS Plugin or if it's simple my mistake.

To organize better the code in my QGIS 3 Plugin, I tried to put all dialogs in one package called dialogs, but when I open QGIS it says ModuleNotFoundError: No module named 'dialogs'

This is the code I used to import the Dialog class in the "main" file, where there's run method (luniPlugin.py in this case)

from dialogs.select_feature_dialog import SelectFeatureDialog 

(and the same for the others dialogs)

This is the folder where the project is:

enter image description here

And, finally, this is the content of the folder "dialogs":

enter image description here

Since python compiler has not given me errors, I'm wondering if it's possible to do this "unpacking" in a QGIS Plugin or if it's simple my mistake.

Source Link
Lorenzo
  • 1.1k
  • 1
  • 7
  • 20

Organize all dialogs in one package QGIS 3 Plugin

to organize better the code in my QGIS 3 Plugin, I tried to put all dialogs in one package called dialogs, but when I open QGIS it says ModuleNotFoundError: No module named 'dialogs'

This is the code I used to import the Dialog class in the "main" file, where there's run method (luniPlugin.py in this case)

from dialogs.select_feature_dialog import SelectFeatureDialog 

(and the same for the others dialogs)

This is the folder where the project is:

enter image description here

And, finally, this is the content of the folder "dialogs":

enter image description here

Since python compiler has not given me errors, I'm wondering if it's possible to do this "unpacking" in a QGIS Plugin or if it's simple my mistake.