qgis-plugin
qgis-plugin copied to clipboard
TypeError: argument of type 'NoneType' is not iterable
An error has occurred while executing Python code: TypeError: argument of type 'NoneType' is not iterable Traceback (most recent call last): File "C:\Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\plugin.py", line 308, in current_project_sync self.manager.project_status(self.mergin_proj_dir) File "C:\Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\projects_manager.py", line 163, in project_status validation_results = validator.run_checks() File "C:\Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\validation.py", line 90, in run_checks self.check_value_relation() File "C:\Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\validation.py", line 273, in check_value_relation self._check_primary_keys(child_layer, [idx]) File "C:\Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\validation.py", line 285, in _check_primary_keys if layer_fields[i].name() in keys: TypeError: argument of type 'NoneType' is not iterable
I have asked the user to share the project with me. I guess it something to do with Views.
Hi @saberraz I've just come across this issue in a project I'm working with.
I have implemented views into the gpkg to avoid using dynamic fields with aggregate logic to bring the 'last inspection' values onto the parent object. The number of aggregates I was implementing was causing significant delay in the opening/creating of the related inspection form.