Re: [QGIS-Developer] Pb QGIS 2.18 / pyuic4

2019-06-07 Thread Luca Manganelli
Il giorno gio 6 giu 2019 alle ore 11:52 Vincent Damoy <
vincent.da...@espaces-naturels.fr> ha scritto:
> "This is a qgis bug. They change the API version which is unsupported in
production code."
>
> Is there a way to bypass this bug with these pyuuic4 and QGIS versions?

Have you tried to comment that line?
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Pb QGIS 2.18 / pyuic4

2019-06-06 Thread Vincent Damoy

Hello,

I've got problems with an old development environment, that I use to 
maintain my plugins.


I want to compile a QGIS plugin that I created myself.

I'm working with QGIS 2.18 and I've got an error with pyuic4 and a UI file :

My version of pyuic4_ : 4.12.1

*The message error**: *

Makefile:52: recipe for target 'ui_bdtravaux_sortie.py' failed
make: *** [ui_bdtravaux_sortie.py] Error 1


And *the **debug text*: (pyuic4 -d ui_bdtravaux_sortie.ui)

*

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 
'ui_bdtravaux_sortie.ui'

#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/port_v2/invoke.py", 
line 34, in invoke exit_status = driver.invoke()
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/driver.py", line 59, 
in invoke

    self._generate()
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/driver.py", line 98, 
in _generate

    self._opts.resource_suffix)
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/__init__.py", line 
173, in compileUi

    winfo = compiler.UICompiler().compileUi(uifile, pyfile,
from_imports, resource_suffix)
  File 
"/usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py", line 
55, in __init__

    CompilerCreatorPolicy())
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 
183, in __init__

    self.factory = QObjectCreator(creatorPolicy)
  File "/usr/lib/python2.7/dist-packages/PyQt4/uic/objcreator.py", line 
94, in __init__

    modinfo = plugin_locals["moduleInformation"]()
  File "", line 52, in moduleInformation
  File "/usr/lib/python2.7/dist-packages/qgis/__init__.py", line 26, in 


    from qgis.PyQt import QtCore
  File "/usr/lib/python2.7/dist-packages/qgis/PyQt/QtCore.py", line 28, 
in 

    sip.setapi(api, 2)
ValueError: API 'QDate' has already been set to version 1

**


I've use my plugin for years, but I have recently changed my computer 
(and reinstalled all my development environment), and the error appeared.


I wrote to pyuic4 support, and this is their answer :

/"//This is a qgis bug. They change the API version which is unsupported 
in production code."/


Is there a way to bypass this bug with these pyuuic4 and QGIS versions?

Thanks for advance

Vincent Damoy




___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer