Skip to content

DeprecationWarning: QgsCoordinateReferenceSystem constructor is deprecated  #171

Description

@bmcollings

Since latest release I am not able to load any basemaps.

Receive the following Python warning when opening QGIS:

2022-08-02T13:57:22 WARNING warning:/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyproj/init.py:78: UserWarning: Valid PROJ data directory not found. Either set the path using the environmental variable PROJ_LIB or with pyproj.datadir.set_data_dir.
warnings.warn(str(err))

         traceback: File "", line 1, in 
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 354, in startPlugin
          if not _startPlugin(packageName):
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin
          plugins[packageName] = package.classFactory(iface)
          File "/Users/ben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/linz-data-importer/__init__.py", line 36, in classFactory
          from .linz_data_importer import ( # pylint:disable=import-outside-toplevel
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 793, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 790, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "/Users/ben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/linz-data-importer/linz_data_importer.py", line 58, in 
          from .service_data import ApiKey, Localstore, ServiceData
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 793, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 790, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "/Users/ben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/linz-data-importer/service_data.py", line 25, in 
          from owslib.wfs import WebFeatureService
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 793, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 790, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/owslib/wfs.py", line 16, in 
          from .feature import wfs100, wfs110, wfs200
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 793, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1058, in _handle_fromlist
          File "", line 228, in _call_with_frames_removed
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 790, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/owslib/feature/wfs100.py", line 33, in 
          import pyproj
          File "/Applications/QGIS3.16.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 793, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "", line 1007, in _find_and_load
          File "", line 986, in _find_and_load_unlocked
          File "", line 680, in _load_unlocked
          File "", line 790, in exec_module
          File "", line 228, in _call_with_frames_removed
          File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyproj/__init__.py", line 78, in 
          warnings.warn(str(err))

When trying to load baseman as layer Python warning:

2022-08-02T13:59:38 WARNING warning:/Users/ben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/linz-data-importer/linz_data_importer.py:763: DeprecationWarning: QgsCoordinateReferenceSystem constructor is deprecated
crs = QgsCoordinateReferenceSystem(

         traceback: File "/Users/ben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/linz-data-importer/linz_data_importer.py", line 786, in import_dataset
          self.set_project_srid()
          File "/Users/ben/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/linz-data-importer/linz_data_importer.py", line 763, in set_project_srid
          crs = QgsCoordinateReferenceSystem(

and WMS warning:
2022-08-02T14:01:23 WARNING Returned image is flawed [Content-Type: image/webp; URL: https://basemaps.linz.govt.nz/v1/tiles/aerial/NZTM2000Quad/2/0/2.webp?api=c01g8rwgmeh18dj1qcznqc5vym6]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions