MerginMaps / MerginMaps/qgis-plugin
TypeError: argument of type 'NoneType' is not iterable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44
- Forks
- 20
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 5
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in validation.py at run_checks(), check_value_relation(), and _check_primary_keys(), following the traceback from projects_manager.py:163 and plugin.py:308. Reproduce the current project-status check and determine why keys is None; done means current_project_sync completes without this TypeError and the validation result remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100