teksi / wastewater

[DEV] Future TEKSI wastewater module, adapted data model to fit VSA-DSS 2020 new standard
https://teksi.github.io/wastewater
GNU General Public License v3.0
2 stars 5 forks source link

Warning when identify a wastewater node #379

Open urskaufmann opened 2 months ago

urskaufmann commented 2 months ago

Describe the bug I get this warning: WARNING Traceback (most recent call last): File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\linking_relation_editor\gui\linking_relation_editor_widget.py", line 774, in afterSetRelations self._checkTransactionGroup() File "C:\Users/KAU/AppData/Roaming/QGIS/QGIS3\profiles\tww_test/python/plugins\linking_relation_editor\gui\linking_relation_editor_widget.py", line 788, in _checkTransactionGroup connectionString = PluginHelper.connectionString(self.relation().referencedLayer().source()) AttributeError: 'NoneType' object has no attribute 'source'

To Reproduce Exact steps to reproduce the behavior:

  1. Select 'vw_wastewater_node' (Editing status does not matter)
  2. Choose 'Identify Features' tool
  3. Click on a wastewater node
  4. See warning

Same behaviour when click on the Wastewater Nodes Tab in vw_tww_wastewater_structure

Expected behavior A clear and concise description of what you expected to happen.

Screenshots / data

Desktop (please complete the following information):

Additional context

cymed commented 2 months ago

Looks like there is a problem with the linking relation editor plugin. What version do you use?

urskaufmann commented 2 months ago

Linking Relation Editor

Provides a relation editor widget with an alternative link child dialog

Provides a relation editor widget with an alternative link child dialog

4 rating vote(s), 14834 downloads Category Vector Tags relation More info homepage bug tracker code repository Author OPENGIS.ch Installed version 1.3.0 Available version (stable) v1.3.0 updated at 22.03.2024 11:08

domi4484 commented 4 weeks ago

In QGIS, when we delete (maybe as well rename?) a relation, the corresponding relation editor widgets are not removed from the attribute forms. This is probably what happened with a relation in the table vw_tww_overflow. The relation editor widget seems configured with a non-existing relation (empty string). @urskaufmann should be trottle_shut off unit-overflow?

image

I made a pull request for the Linking relation editor to not show a python exception but log a little more explicative warning https://github.com/opengisch/qgis-linking-relation-editor/pull/51

Still this kind of issue can be hard to find. It would be good to find a solution in QGIS to warn the user about such kind of misconfiguration

domi4484 commented 4 weeks ago

@ponceta maybe in the similar direction of https://github.com/qgis/QGIS/issues/58973 we could propose to add a warning icon o something visual in the column Form Layout to indicate when an editor widget is configured for a no-more-existing field or a relation editor is configured for a no-more-existing relation

ponceta commented 3 weeks ago

@ponceta maybe in the similar direction of qgis/QGIS#58973 we could propose to add a warning icon o something visual in the column Form Layout to indicate when an editor widget is configured for a no-more-existing field or a relation editor is configured for a no-more-existing relation

Very good idea, I open a feature request in that sense, then we look to provide an estimation of such estimations to the QGIS CH Grants.

ponceta commented 3 weeks ago

See the request QGIS Side : https://github.com/qgis/QGIS/issues/59001

ponceta commented 2 weeks ago

I have no such warning on https://github.com/teksi/wastewater/pull/464