MerginMaps / MerginMaps/qgis-plugin

TypeError: argument of type 'NoneType' is not iterable

Open
#436 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.