atti.mueller via Pyzo
2018-02-27 13:47:13 UTC
Hi!
I'm using pyzo with a python distribution including PyQt4. When I run code which imports PyQt4 through another module it gives me the error above. It seems to be related to sip configuration inside the imported module:
Traceback (most recent call last):
File "J:\am\ShapeViewer.py", line 1, in <module>
from qgis.core import *
File "J:\osgeo4w\apps\qgis-ltr\python\qgis\__init__.py", line 26, in <module>
from qgis.PyQt import QtCore
File "J:\osgeo4w\apps\qgis-ltr\python\qgis\PyQt\QtCore.py", line 28, in <module>
sip.setapi(api, 2)
ValueError: API 'QDate' has already been set to version 1
ShapeViewer is my own module and it imports module qgis which itself imports PyQt\QtCore.
When i turn off PyQt4 in the shell configuration, the error does not rise. At this point I don't understand what causes this error AND why do i need a gui selection in shell configuration at all - what are the (dis-)advantages?
Regards,
Andreas
I'm using pyzo with a python distribution including PyQt4. When I run code which imports PyQt4 through another module it gives me the error above. It seems to be related to sip configuration inside the imported module:
Traceback (most recent call last):
File "J:\am\ShapeViewer.py", line 1, in <module>
from qgis.core import *
File "J:\osgeo4w\apps\qgis-ltr\python\qgis\__init__.py", line 26, in <module>
from qgis.PyQt import QtCore
File "J:\osgeo4w\apps\qgis-ltr\python\qgis\PyQt\QtCore.py", line 28, in <module>
sip.setapi(api, 2)
ValueError: API 'QDate' has already been set to version 1
ShapeViewer is my own module and it imports module qgis which itself imports PyQt\QtCore.
When i turn off PyQt4 in the shell configuration, the error does not rise. At this point I don't understand what causes this error AND why do i need a gui selection in shell configuration at all - what are the (dis-)advantages?
Regards,
Andreas
--
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyzo+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.