Bug report #11281

GEOS 3.4.2-CAPI-1.8.2 r3921 cause "invalid literal for int() with base 10: '2 r3921' "

Added by julio cesar de menezes over 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:19577

Description

QGIS 2.4.0-Chugiak

Compiled GEOS 3.3.3-CAPI-1.7.4 Running GEOS 3.4.2-CAPI-1.8.2 r3921

"invalid literal for int() with base 10: '2 r3921' "

release string 'r3921' crash several python plugins install

History

#1 Updated by Jürgen Fischer almost 9 years ago

  • Status changed from Open to Feedback

where does this happen?

#2 Updated by julio cesar de menezes almost 9 years ago

Hi Jürgen Fischer

It occures during plugins instalations, like contour.py

Error:

  File "/usr/lib/python2.7/dist-packages/shapely/geos.py", line 98, in
    return tuple(int(n) for n in v.split('.'))
ValueError: invalid literal for int() with base 10: '2 r3921'

My solution:
edit GEOS.PY and apply a "patch".

Debian  GNU/Linux
#cd /usr/lib/python2.7/dist-packages/shapely
# gedit geos.py
# my patch

def _geos_c_version():
    func = _lgeos.GEOSversion
    func.argtypes = []
    func.restype = c_char_p
    v = func().split('-')[2]
# patch julio menezes v.replace()3.4.2-CAPI-1.8.2 r3921
    v=v.replace(' r3921','')
    return tuple(int(n) for n in v.split('.'))

my sincere thanks to all QGIS developers.

regards,
julio menezes
cartognu.org

#3 Updated by Jürgen Fischer almost 9 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Looks like a Shapely issue and no QGIS problem

Also available in: Atom PDF