Skip to content

QGIS 3.40 and Dataplotty 4.3.1 : python error on layout #379

Description

@palight

Describe

I have a project with a report wich contains several plots (bar, histogram, scatter, but no radar plot). Since update from 4.2.0 to 4.3.1, when I open the report I got a python error about radar plot (that I don't use)

KeyError: 'y_combo_radar_label' 
Traceback (most recent call last):
  File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\DataPlotly\layouts\plot_layout_item.py", line 157, in draw
    self.load_content()
  File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\DataPlotly\layouts\plot_layout_item.py", line 223, in load_content
    self.web_page.mainFrame().setHtml(self.create_plot(), base_url)
                                      ^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\DataPlotly\layouts\plot_layout_item.py", line 189, in create_plot
    plot_factory = PlotFactory(self.plot_settings[0], self, polygon_filter=polygon_filter)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\DataPlotly\core\plot_factory.py", line 117, in __init__
    self.rebuild()
  File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\DataPlotly\core\plot_factory.py", line 477, in rebuild
    self.fetch_values_from_layer()
  File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\DataPlotly\core\plot_factory.py", line 167, in fetch_values_from_layer
    self.settings.properties[
KeyError: 'y_combo_radar_label'

Reproduce
Steps to reproduce the behavior:

  1. Open project with report containing plots
  2. Then open the report and see the pyhton error and Qgis closing

Screenshots

none, error seems enough

Desktop (please complete the following information):

  • OS: Windows 11
  • QGIS release 3.40.6
  • DataPlotly 4.3.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions