[Qgis-user] Python error
John C. Tull
john.tull at wildnevada.org
Wed Jan 14 10:06:31 PST 2009
On Jan 14, 2009, at 9:55 AM, Bernardo Rossi Doria wrote:
> hello all
> downloaded and installed qgis 1.0 osx after I deleted previous
> version on macbook pro
>
> When I open the app a Python error comes out with this description.
> Couldn't load plugin "newlayer" from
> ['/Applications/qgis-1.0.0/qgis1.0.0.app/Contents/MacOS/share/qgis/
> python', '/Users/bernardo/.qgis//python/plugins', '/Applications/
> qgis-1.0.0/qgis1.0.0.app/Contents/MacOS/share/qgis/python/plugins',
> '/Library/Python/2.5/site-packages/GDAL-1.5.2-py2.5-macosx-10.5-
> i386.egg', '/System/Library/Frameworks/Python.framework/Versions/2.5/
> lib/python25.zip', '/System/Library/Frameworks/Python.framework/
> Versions/2.5/lib/python2.5', '/System/Library/Frameworks/
> Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/System/
> Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
> mac', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/
> Python.framework/Versions/2.5/Extras/lib/python', '/System/Library/
> Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/
> System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/lib-dynload', '/Library/Python/2.5/site-packages', '/Users/
> bernardo/.qgis/python/plugins/fTools_preview2/tools']
>
> Traceback (most recent call last):
> File "", line 2, in
> File "/Users/bernardo/.qgis//python/plugins/newlayer/__init__.py",
> line 2, in
> from newlayer import NewLayer
> File "/Users/bernardo/.qgis//python/plugins/newlayer/newlayer.py",
> line 5, in
> import psycopg
> ImportError: No module named psycopg
>
> Versione Python:
> 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
> [GCC 4.0.1 (Apple Inc. build 5465)]
>
>
> If I click OK the application freezes
> So I deleted in Application /contents the PyQt4 folder
> content and then it says : "Impossibile caricare PyQt4.
> Il supporto Python verrĂ disabilitato." but opens and works fine
> with other plugins.
>
> What is wrong with PyQt4?
>
I don't think anything is wrong with PyQt4. Instead of deleting
necessary items from the application bundle, you need to delete your
incompatible plugin. From the terminal do:
rm -r /Users/bernardo/.qgis/python/plugins/newlayer
That will take care of the offending plugin. You may have others, in
which case, doing:
rm -r /Users/bernardo/.qgis/python/plugins
is probably preferable (start with a clean slate for the new API in
1.0.0).
You also need to reinstall your qgis application because you need
everything inside the application bundle. Deleting things from there
will break it every time.
Regards,
John
More information about the Qgis-user
mailing list