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

Do not add docks if self.iface is not defined when using qgis_process #345

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

Gustry
Copy link
Collaborator

@Gustry Gustry commented Feb 20, 2024

To avoid the Python error with qgis_process :

➜ qgis_process run native:atlaslayouttomultiplepdf --distance_units=meters --area_units=m2 --ellipsoid=NONE --project_path=/home/etienne/dev/python/lizmap-plugin/lizmap/test/data/lizmap_3_3.qgs --LAYOUT=landscape --COVERAGE_LAYER=/home/etienne/dev/python/lizmap-plugin/lizmap/test/data/lines.geojson --FILTER_EXPRESSION= --SORTBY_EXPRESSION= --SORTBY_REVERSE=false --FORCE_VECTOR=false --FORCE_RASTER=false --GEOREFERENCE=true --INCLUDE_METADATA=true --DISABLE_TILED=false --SIMPLIFY=true --TEXT_FORMAT=0 --IMAGE_COMPRESSION=0 --OUTPUT_FILENAME= --OUTPUT_FOLDER=/tmp/
Traceback (most recent call last):
  File "/home/etienne/.local/share/QGIS/QGIS3/profiles/default/python/plugins/DataPlotly/gui/dock.py", line 131, in addDocksFromProject
    self.iface.mainWindow().restoreGeometry(self.geometry)
AttributeError: 'NoneType' object has no attribute 'mainWindow'

For sure, a lot of code execution can be avoided with qgis_process with these Dock.

@ghtmtt
Copy link
Owner

ghtmtt commented Feb 21, 2024

thanks for the addition @Gustry

@ghtmtt ghtmtt merged commit 7ab2553 into ghtmtt:master Feb 21, 2024
1 of 3 checks passed
@Gustry Gustry deleted the qgis_process_iface branch February 21, 2024 07:37
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