qgis-plugin icon indicating copy to clipboard operation
qgis-plugin copied to clipboard

Type error for setting variables

Open varmar05 opened this issue 4 years ago • 2 comments

When using some project from python client tests, on sync I got

image

varmar05 avatar Oct 02 '20 06:10 varmar05

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' 
Traceback (most recent call last):
  File "/home/saber/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/plugin.py", line 94, in set_project_variables
    if path == QgsProject.instance().absolutePath() or path + '/' in QgsProject.instance().absolutePath():
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'


Python version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] 
QGIS version: 3.14.16-Pi Pi, a235a149f0 

saberraz avatar Oct 15 '20 07:10 saberraz

It looks like it is caused by entries like this one in QGIS3.ini which will set the path variable to None:

localProjects\saber\test10\path=@Invalid()

But it's unclear how do we get to a point where we set path to invalid QVariant...

wonder-sk avatar Nov 03 '20 11:11 wonder-sk