Skip to content

TypeError: 'QVariant' object is not subscriptable #21

@marklit

Description

@marklit

This error comes up during installation.

Couldn't load plugin 'flight_planner' due to an error when calling its classFactory() method 

TypeError: 'QVariant' object is not subscriptable 
Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/mark/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/flight_planner/__init__.py", line 36, in classFactory
    return FlightPlanner(iface)
  File "/Users/mark/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/flight_planner/flight_planner.py", line 51, in __init__
    locale = QSettings().value('locale/userLocale')[0:2]
TypeError: 'QVariant' object is not subscriptable

Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)]
QGIS version: 3.34.3-Prizren Prizren, 47373234acd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions