I had another thought: possibly a bug in the shapely load_dll() function. It
tries to load the primary library name, if the file exists, otherwise it tries
the fallbacks. The GEOS framework is a fallback, and libgeos_c is the primary.
You probably have an old libgeos_c built only 32 bit, so the file exists but
it fails to load and shapely never tries the fallbacks.
On Feb 28, 2014, at 9:02 AM, William Kyngesburye wrote:
> Does the import work from python in a Terminal? (make sure it's the system
> python, /usr/bin/python)
>
> On Feb 28, 2014, at 5:29 AM, Agustin Diez-Castillo wrote:
>
>> I did remove processing from ~/.qgis2 (see new error at bottom) and try from
>> the python console. No luck
>>
>> from shapely.ops import polygonize
>>
>> Traceback (most recent call last):
>> File "<input>", line 1, in <module>
>> File
>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py",
>> line 453, in _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>> File
>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/ops.py",
>> line 7, in <module>
>> from shapely.geos import lgeos
>> File
>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py",
>> line 453, in _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>> File
>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geos.py",
>> line 59, in <module>
>> _lgeos = load_dll('geos_c', fallbacks=alt_paths)
>> File
>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geos.py",
>> line 32, in load_dll
>> return CDLL(lib)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>> line 365, in __init__
>> self._handle = _dlopen(self._name, mode)
>> OSError: dlopen(/usr/local/lib/libgeos_c.dylib, 6): no suitable image found.
>> Did find:
>> /usr/local/lib/libgeos_c.dylib: no matching architecture in universal
>> wrapper
>>
>> the new log
>>
>> Uncaught error while executing algorithm
>> Traceback (most recent call last):
>> Traceback (most recent call last):
>> File
>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py",
>> line 202, in execute
>> self.processAlgorithm(progress)
>> File
>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/algs/Polygonize.py",
>> line 48, in processAlgorithm
>> from shapely.ops import polygonize
>> File
>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py",
>> line 453, in _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>> File
>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/ops.py",
>> line 7, in <module>
>> from shapely.geos import lgeos
>> File
>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py",
>> line 453, in _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>> File
>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geos.py",
>> line 59, in <module>
>> _lgeos = load_dll('geos_c', fallbacks=alt_paths)
>> File
>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geos.py",
>> line 32, in load_dll
>> return CDLL(lib)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>> line 365, in __init__
>> self._handle = _dlopen(self._name, mode)
>> OSError: dlopen(/usr/local/lib/libgeos_c.dylib, 6): no suitable image found.
>> Did find:
>> /usr/local/lib/libgeos_c.dylib: no matching architecture in universal wrapper
>>
>>
>>
>> On Thu, Feb 27, 2014 at 1:59 AM, William Kyngesburye <[email protected]>
>> wrote:
>> A couple thoughts. At least from Python and the QGIS python console, I
>> don't have problems.
>>
>> Try running this in the QGIS python console:
>>
>> from shapely.ops import polygonize
>>
>> Also, I wonder if the extra copy of the Processing plugin is the problem
>> (your error is coming out of your .qgis2 installed (updated) plugins).
>> Possibly you updated the processing plugin in QGIS 2.0, but now it's older
>> than the copy in 2.2. Try deleting the copy in ~/.qgis2.
>>
>> On Feb 26, 2014, at 10:27 AM, William Kyngesburye wrote:
>>
>>> I added Shapely to my GEOS framework last fall. It looks like it's having
>>> problems loading the GEOS framework. I'll look into it this evening.
>>>
>>> On Feb 26, 2014, at 10:18 AM, Agustin Diez-Castillo wrote:
>>>
>>>> Not sure if the right list
>>>> When trying to polygonize with Kyngchaos' last version I got this message.
>>>> No sure if this problem only occurs in Mac.
>>>> Agustin
>>>>
>>>> OSError: dlopen(/usr/local/lib/libgeos_c.dylib, 6): no suitable image
>>>> found. Did find:
>>>> /usr/local/lib/libgeos_c.dylib: no matching architecture in universal
>>>> wrapper
>>>>
>>>> Uncaught error while executing algorithm
>>>> Traceback (most recent call last):
>>>> Traceback (most recent call last):
>>>> File "/Users/adiez/.qgis2/python/plugins/processing/core/GeoAlgorithm.py",
>>>> line 202, in execute
>>>> self.processAlgorithm(progress)
>>>> File "/Users/adiez/.qgis2/python/plugins/processing/algs/Polygonize.py",
>>>> line 48, in processAlgorithm
>>>> from shapely.ops import polygonize
>>>> File
>>>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py",
>>>> line 453, in _import
>>>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>>> File
>>>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/ops.py",
>>>> line 7, in <module>
>>>> from shapely.geos import lgeos
>>>> File
>>>> "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py",
>>>> line 453, in _import
>>>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>>> File
>>>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geos.py",
>>>> line 59, in <module>
>>>> _lgeos = load_dll('geos_c', fallbacks=alt_paths)
>>>> File
>>>> "/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/shapely/geos.py",
>>>> line 32, in load_dll
>>>> return CDLL(lib)
>>>> File
>>>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py",
>>>> line 365, in __init__
>>>> self._handle = _dlopen(self._name, mode)
>>>> OSError: dlopen(/usr/local/lib/libgeos_c.dylib, 6): no suitable image
>>>> found. Did find:
>>>> /usr/local/lib/libgeos_c.dylib: no matching architecture in universal
>>>> wrapper
>>>> QGIS version2.2.0-ValmieraQGIS code revisionCompiled against
>>>> Qt4.8.5Running against Qt4.8.5Compiled against GDAL/OGR1.10.1Running
>>>> against GDAL/OGR1.10.1Compiled against GEOS3.4.2-CAPI-1.8.2Running against
>>>> GEOS3.4.2-CAPI-1.8.2 r3921PostgreSQL Client Version9.3.1SpatiaLite
>>>> Version4.1.1QWT Version6.0.2PROJ.4 Version480QScintilla2 Version2.8
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "This is a question about the past, is it? ... How can I tell that the past
> isn't a fiction designed to account for the discrepancy between my immediate
> physical sensations and my state of mind?"
>
> - The Ruler of the Universe
>
>
> _______________________________________________
> Qgis-user mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/qgis-user
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Earth: "Mostly harmless"
- revised entry in the HitchHiker's Guide to the Galaxy
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user