[QGIS-Developer] Breaking default profile

Richard Duivenvoorde rdmailings at duif.net
Fri Jul 24 08:02:43 PDT 2020


Ok, checking my QGIS3.ini I see that the CityJSON Loader plugin I tested yesterday has some settings with 'PyQt_PyObject' in it...
See below. I think that was the problem

Removing the part below from my QGIS3.ini makes QGIS startup again.


[CityJSON%20Loader]
semantic_colors\1\ambient=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\xffK\0K\0K\xfft\x94.)
semantic_colors\1\diffuse=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\xffK\0K\0K\xfft\x94.)
semantic_colors\1\specular=@Invalid()
semantic_colors\1\surface=RoofSurface
semantic_colors\2\ambient=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\xffK\xffK\xffK\xfft\x94.)
semantic_colors\2\diffuse=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\xc8K\xc8K\xc8K\xfft\x94.)
semantic_colors\2\specular=@Invalid()
semantic_colors\2\surface=WallSurface
semantic_colors\3\ambient=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\0K\0K\0K\xfft\x94.)
semantic_colors\3\diffuse=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\0K\0K\0K\xfft\x94.)
semantic_colors\3\specular=@Invalid()
semantic_colors\3\surface=GroundSurface
semantic_colors\4\ambient=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\xffK\xc8K\0K\xfft\x94.)
semantic_colors\4\diffuse=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\xffK\xc8K\0K\xfft\x94.)
semantic_colors\4\specular=@Invalid()
semantic_colors\4\surface=Door
semantic_colors\5\ambient=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\0KdK\xffK\xfft\x94.)
semantic_colors\5\diffuse=@Variant(\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x17\x80\x4\x95\f\0\0\0\0\0\0\0(K\0KdK\xffK\xfft\x94.)
semantic_colors\5\specular=@Invalid()
semantic_colors\5\surface=Window
semantic_colors\size=5


Code for that plugin is here:

https://github.com/cityjson/cityjson-qgis-plugin

The object written to Settings is:

https://github.com/cityjson/cityjson-qgis-plugin/blob/main/core/settings.py#L6-L32

semantic_colors = {
    "RoofSurface": {
        "diffuse": QColor(255, 0, 0),
        "ambient": QColor(255, 0, 0),
        "specular": None
    },
...

So either QGIS or Qt cannot handle nested Qt objects as Settings values?

Besides asking the plugin authors to fix this, is there something QGIS can do?
As I reading settings of a plugin should not be able to crash QGIS I think?

Regards,

Richard Duivenvoorde




On 7/24/20 4:49 PM, Richard Duivenvoorde wrote:
> Doing a normal startup I now see starts with:
> "Warning: QVariant::load: unknown user type with name PyQt_PyObject."
> See below
> 
> Richard


More information about the QGIS-Developer mailing list