Bug report #16266

OWSLib failed because pyproj is missing

Added by geo julien over 2 years ago. Updated over 2 years ago.

Status:Closed
Priority:High
Assignee:Tom Kralidis
Category:Python plugins
Affected QGIS version:2.18.4 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24176

Description

I use the OWSLib version integrated within QGIS in my plugin, to handle main OGC services (WMS/WMTS and WFS).
It's sometimes quite hard because of different lib versions. For example:

In 2.8.x
owslib version:'0.8.8'
from owslib.util import HTTPError

In 2.14.x
owslib version: '0.11.2'
from urrlib2 import HTTPError

Nothing which can't be handled by Python code. But in 2.18.4, pyrproj, an OWSLib dependency, is missing and I don't think that I can find a workaround by myself. Is it normal?

from owslib.wfs import WebFeatureService
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\\qgis\\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\\owslib\\wfs.py", line 18, in <module>
    from .feature import wfs100, wfs110, wfs200
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\\qgis\\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\\owslib\\feature\\wfs100.py", line 27, in <module>
    import pyproj
  File "C:/PROGRA~1/QGIS2~1.18/apps/qgis/./python\\qgis\\utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named pyproj

qgis_214_osgeo4w_owslib_wfs.png - on QGIS 2.14.12 (OSGeo4W) (164 KB) geo julien, 2017-03-09 01:55 AM

qgis_218_osgeo4w_owslib_wfs.png - on QGIS 2.18.4 (setup.exe) (123 KB) geo julien, 2017-03-09 01:55 AM

History

#1 Updated by geo julien over 2 years ago

Ups, typo error on mentioned QGIS versions:

In 2.14.x owslib version:'0.8.8' from owslib.util import HTTPError
In 2.18.x owslib version: '0.11.2' from urrlib2 import HTTPError

#2 Updated by René-Luc ReLuc over 2 years ago

  • Assignee set to Tom Kralidis
  • Target version set to Version 2.18
  • Priority changed from Normal to High

The requirements for pyproj is not resolved.
pyproj is lacking in `python/ext-libs`

#3 Updated by geo julien over 2 years ago

Adding screen captures

#4 Updated by René-Luc ReLuc over 2 years ago

  • Assignee set to Tom Kralidis
  • Target version set to Version 2.18

#5 Updated by Tom Kralidis over 2 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Fixed in 2.18 branch (05e74803)

Also available in: Atom PDF