Closed mikhailtchernychev closed 9 years ago
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
Thanks for letting me know ... I'm also on ubuntu so not affected (and can't test it) .. so great to get the feedback from different platforms.
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 2:07 p.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27738866.
Hi Chris,
Apparently "python-shapely" was undated today for Os4geow from 1.2.9-3 -> 1.2.18-1 I don't know if update was related to this bug, but bug is still there ...
Best Regards,
Mikhail Tchernychev
On Monday, November 4, 2013 5:14 PM, Chris Crook notifications@github.com wrote:
Thanks for letting me know ... I'm also on ubuntu so not affected (and can't test it) .. so great to get the feedback from different platforms.
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 2:07 p.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27738866.
— Reply to this email directly or view it on GitHub.
Yup, the update was prompted by a ticket I raised I think.
Shapely was supposed to have fixed this at version 1.2.15 (according to the author) so very odd the bug is still there...
Looks like I'll have to find a place to install OSGEO4W to test this ....
Thanks Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Wednesday, 6 November 2013 9:54 a.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
Apparently "python-shapely" was undated today for Os4geow from 1.2.9-3 -> 1.2.18-1 I don't know if update was related to this bug, but bug is still there ...
Best Regards,
Mikhail Tchernychev
On Monday, November 4, 2013 5:14 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Thanks for letting me know ... I'm also on ubuntu so not affected (and can't test it) .. so great to get the feedback from different platforms.
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 2:07 p.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nzmailto:info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27738866.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27811325.
Just in case, I am attaching the damp I got today:
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in _geos_c_version File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, eb6ca1e
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards,
Mikhail Tchernychev
On Tuesday, November 5, 2013 1:15 PM, Chris Crook notifications@github.com wrote:
Yup, the update was prompted by a ticket I raised I think.
Shapely was supposed to have fixed this at version 1.2.15 (according to the author) so very odd the bug is still there...
Looks like I'll have to find a place to install OSGEO4W to test this ....
Thanks Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Wednesday, 6 November 2013 9:54 a.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
Apparently "python-shapely" was undated today for Os4geow from 1.2.9-3 -> 1.2.18-1 I don't know if update was related to this bug, but bug is still there ...
Best Regards,
Mikhail Tchernychev
On Monday, November 4, 2013 5:14 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Thanks for letting me know ... I'm also on ubuntu so not affected (and can't test it) .. so great to get the feedback from different platforms.
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 2:07 p.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nzmailto:info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27738866.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27811325.
— Reply to this email directly or view it on GitHub.
Certainly the same problem. From the geos.py line number (97) it looks like the code change in shapely wasn't applied - you can see what was supposed to have happened at
https://github.com/Toblerity/Shapely/commit/180b3709ccf6662904fed17ba0dbecde55d551d5
This should definitely have fixed it. Could you send me the file C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py. I'm pretty sure that this is the old version - which doesn't make sense with the OSGeo4W update having been applied...
Thanks Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Wednesday, 6 November 2013 10:42 a.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Just in case, I am attaching the damp I got today:
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in _geos_c_version File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, eb6ca1e
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards,
Mikhail Tchernychev
On Tuesday, November 5, 2013 1:15 PM, Chris Crook notifications@github.com wrote:
Yup, the update was prompted by a ticket I raised I think.
Shapely was supposed to have fixed this at version 1.2.15 (according to the author) so very odd the bug is still there...
Looks like I'll have to find a place to install OSGEO4W to test this ....
Thanks Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Wednesday, 6 November 2013 9:54 a.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
Apparently "python-shapely" was undated today for Os4geow from 1.2.9-3 -> 1.2.18-1 I don't know if update was related to this bug, but bug is still there ...
Best Regards,
Mikhail Tchernychev
On Monday, November 4, 2013 5:14 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Thanks for letting me know ... I'm also on ubuntu so not affected (and can't test it) .. so great to get the feedback from different platforms.
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 2:07 p.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nzmailto:info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27738866.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27811325.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27815152.
Hi Chris,
"geos.py" is attached. On mys system it is dated 06/24/2013 There is folder "geometry" with date stamp as of today, but all files in it dated as 06/24/2013 as well.
It seems it was not updated.
Cheers,
Mikhail
On Tuesday, November 5, 2013 1:52 PM, Chris Crook notifications@github.com wrote:
Certainly the same problem. From the geos.py line number (97) it looks like the code change in shapely wasn't applied - you can see what was supposed to have happened at
https://github.com/Toblerity/Shapely/commit/180b3709ccf6662904fed17ba0dbecde55d551d5
This should definitely have fixed it. Could you send me the file C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py. I'm pretty sure that this is the old version - which doesn't make sense with the OSGeo4W update having been applied...
Thanks Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Wednesday, 6 November 2013 10:42 a.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Just in case, I am attaching the damp I got today:
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in _geos_c_version File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, eb6ca1e
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards,
Mikhail Tchernychev
On Tuesday, November 5, 2013 1:15 PM, Chris Crook notifications@github.com wrote:
Yup, the update was prompted by a ticket I raised I think.
Shapely was supposed to have fixed this at version 1.2.15 (according to the author) so very odd the bug is still there...
Looks like I'll have to find a place to install OSGEO4W to test this ....
Thanks Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Wednesday, 6 November 2013 9:54 a.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
Apparently "python-shapely" was undated today for Os4geow from 1.2.9-3 -> 1.2.18-1 I don't know if update was related to this bug, but bug is still there ...
Best Regards,
Mikhail Tchernychev
On Monday, November 4, 2013 5:14 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Thanks for letting me know ... I'm also on ubuntu so not affected (and can't test it) .. so great to get the feedback from different platforms.
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 2:07 p.m. To: ccrook/QGIS-Contour-Plugin Cc: Chris Crook Subject: Re: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
I was not sure it is exactly in "contour" but it is somehow involved. I don't see this problem on Linux (Ubunty 12.04) . Perhaps OS2Geow updates "shapely" as well. I recall installing shapely on Linux from distro repository.
Anyway, I am not using it now but just wanted to let you know, to help make things better :))
Cheers,
Mikhail
On Monday, November 4, 2013 4:16 PM, Chris Crook notifications@github.com<mailto:notifications@github.com> wrote:
Hi Mikhail
I can see what the problem is, though I'm not sure what to do about it.
Basically the contour plugin uses the shapely python library for generating geometries, and that in turn uses the geos library. When shapely starts up it is testing the version of the GEOS library, and trying to interpret the value returned as a #.# version string. However the GEOS version (presumably a development version), is something like "x.2 r3921", and that is causing the problem.
The best fix is probably to fix shapely to make it robust against running with development versions of the GEOS library. I've reported it in the shapely issues register at https://github.com/Toblerity/Shapely/issues/76
Cheers Chris
From: Mikhail Tchernychev [mailto:notifications@github.com] Sent: Tuesday, 5 November 2013 9:38 a.m. To: ccrook/QGIS-Contour-Plugin Subject: [QGIS-Contour-Plugin] Cannot load plugin in 2.1.0 (#3)
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in import mod = _builtinimport(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = geosc_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in geosc_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3.
This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info@linz.govt.nzmailto:info@linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27738866.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27811325.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/ccrook/QGIS-Contour-Plugin/issues/3#issuecomment-27815152.
— Reply to this email directly or view it on GitHub.
Also on Win8 with a skinny install of 2.0.1_3. Will do a test whenever I get a prompt. ciao.
On my system I found two folders:
C:\OSGeo4W\apps\python27\lib\site-packages\shapely and C:\OSGeo4W\apps\python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg
The last one was updated today, by QGIS is still uses first one while loading "contour"
I renamed "shapely" into "shapely-old" and
Shapely-1.2.18-py2.7-win32.egg into "shapely" but now it cannot find module "shapely.geometry"
Now it I copy folder "shapely" from Shapely-1.2.18-py2.7-win32.egg into C:\OSGeo4W\apps\python27\lib\site-packages\ everything works!
Best Regards,
Mikhail Tchernychev
On Tuesday, November 5, 2013 2:04 PM, BillWilliamson notifications@github.com wrote:
Also on Win8 with a skinny install of 2.0.1_3. Will do a test whenever I get a prompt. ciao. — Reply to this email directly or view it on GitHub.
Thanks Mikhail
I've updated the OsGeo4W ticket at http://trac.osgeo.org/osgeo4w/ticket/390 with this info ...
Great! Thank you!
I feel we are almost there (at least it works now on my system, but I don't like this manual "fix")
Best Regards,
Mikhail
On Tuesday, November 5, 2013 2:32 PM, Chris Crook notifications@github.com wrote:
Thanks Mikhail I've updated the OsGeo4W ticket at http://trac.osgeo.org/osgeo4w/ticket/390 with this info ... — Reply to this email directly or view it on GitHub.
Hi Chris,
As latest development QGIS version updates, I started getting following messages on start up, and "contour" gets reported as broken plugin.
Couldn't load plugin contour due an error when calling its classFactory() method
Traceback (most recent call last): File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 204, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/misha/.qgis2/python/plugins\contourinit.py", line 47, in classFactory from contour import Contour File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/misha/.qgis2/python/plugins\contour\contour.py", line 41, in from shapely.geometry import MultiLineString, MultiPolygon File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometryinit.py", line 4, in from geo import box, shape, asShape, mapping File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\geo.py", line 5, in from point import Point, asPoint File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geometry\point.py", line 7, in from shapely.geos import lgeos, DimensionError File "C:/OSGeo4W/apps/qgis-dev/./python\qgis\utils.py", line 453, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 99, in geos_capi_version = geos_c_version = _geos_c_version() File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in _geos_c_version return tuple(int(n) for n in v.split('.')) File "C:\OSGeo4W\apps\Python27\lib\site-packages\shapely\geos.py", line 97, in return tuple(int(n) for n in v.split('.')) ValueError: invalid literal for int() with base 10: '2 r3921'
Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version: 2.1.0-Master Master, d901e50
Python path: ['C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/misha/.qgis2/python', u'C:/Users/misha/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\OSGeo4W\apps\orfeotoolbox\python', 'C:\OSGeo4W\bin', 'C:\OSGeo4W\bin\python27.zip', 'C:\OSGeo4W\apps\Python27\DLLs', 'C:\OSGeo4W\apps\Python27\lib', 'C:\OSGeo4W\apps\Python27\lib\plat-win', 'C:\OSGeo4W\apps\Python27\lib\lib-tk', 'C:\OSGeo4W\apps\Python27', 'C:\OSGeo4W\apps\Python27\lib\site-packages', 'C:\OSGeo4W\apps\Python27\lib\site-packages\PIL', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32', 'C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib', 'C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin', 'C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode']
Best Regards, Mikhail