Python error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Python error

Bernardo Rossi Doria
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?

Thank you for any help

 and for all remarqable improvements that all you did with this version.

Best congratulations by a final user 
bernardo

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Python error

John C. Tull
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

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Python error

pcav
In reply to this post by Bernardo Rossi Doria
Bernardo Rossi Doria ha scritto:
> hello all
> downloaded and installed qgis 1.0 osx  after I deleted previous version
> on macbook pro

Bernardo: you have an old plugin, that should be upgraded.
Better remove all your plugins from the home directory, and let the new
installer pick up the appropriate plugins.
All the best.
pc
--
Paolo Cavallini, see: * http://www.faunalia.it/pc *
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Python error

Bernardo Rossi Doria
In reply to this post by John C. Tull
thank you
I proceeded as you suggested
now no problems
bernardo

Il giorno 14/gen/09, alle ore 19:06, John C. Tull ha scritto:

> 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
>

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-user