Re: [QGIS-Developer] PyQt db_manager(?) compile error

2023-01-30 Thread Richard Duivenvoorde via QGIS-Developer


Ok, so the crux was:

sudo apt install libqt5multimedia5 python3-pyqt5.qtmultimedia

I did install the first one, but the other not (yet)

Thanks Even R !

Richard

On 1/30/23 13:04, matteo via QGIS-Developer wrote:

Hi Richard,

same here. On Debian with a new folder and a fresh compilation. Did you solved?

make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:90:
 python/plugins/db_manager/ui_DlgCancelTaskQuery.py] Error 1
make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCancelTaskQuery.py'
make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:98:
 python/plugins/db_manager/ui_DlgCreateIndex.py] Error 1
make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateIndex.py'
make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:102:
 python/plugins/db_manager/ui_DlgCreateTable.py] Error 1
make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateTable.py'
An unexpected error occurred.
Check that you are using the latest version of PyQt5 and send an error report to
supp...@riverbankcomputing.com, including the following information:

   * your version of PyQt (5.15.8)
   * the UI file that caused this error
   * the debug output of pyuic5 (use the -d flag when calling pyuic5)
make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:94:
 python/plugins/db_manager/ui_DlgCreateConstraint.py] Error 1
make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateConstraint.py'
make[1]: *** [CMakeFiles/Makefile2:6344: 
python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/all] Error 2

Cheers

Matteo


On 1/27/23 13:23, Richard Duivenvoorde via QGIS-Developer wrote:

Hi,

Compiling master on Debian Testing today, I first was presented with a new 
dependency Qt5Multimedia (hopefully we can soon use QGIS as a Spotify client 
;-) ), which was installable.

But then my (fresh) build stalls at:

[9773/9812] Generating ui_DlgAddGeometryColumn.py
FAILED: python/plugins/db_manager/ui_DlgAddGeometryColumn.py 
/home/richard/git/qgis/build/python/plugins/db_manager/ui_DlgAddGeometryColumn.py
cd /home/richard/git/qgis/build/python/plugins/db_manager && 
/home/richard/git/qgis/scripts/pyuic_wrapper.sh /usr/bin/pyuic5 
/home/richard/git/qgis/build/output/lib /home/richard/git/qgis/build/output/python 
/usr/bin/python3 
/home/richard/git/qgis/python/plugins/db_manager/ui/DlgAddGeometryColumn.ui -o 
/home/richard/git/qgis/build/python/plugins/db_manager/ui_DlgAddGeometryColumn.py
An unexpected error occurred.
Check that you are using the latest version of PyQt5 and send an error report to
supp...@riverbankcomputing.com, including the following information:

   * your version of PyQt (5.15.7)
   * the UI file that caused this error
   * the debug output of pyuic5 (use the -d flag when calling pyuic5)

Others have that issue?

Running pyuic -d on one of the errors seems fine (see below).

Regards,

Richard Duivenvoorde


/usr/bin/pyuic5 -d 
/home/richard/git/qgis/python/plugins/db_manager/ui/DlgExportVector.ui


PyQt5.uic.uiparser: uiname is DbManagerDlgExportVector
PyQt5.uic.uiparser: toplevel widget is QDialog
PyQt5.uic.properties: setting property geometry
PyQt5.uic.properties: setting property windowTitle
PyQt5.uic.uiparser: push QDialog DbManagerDlgExportVector
PyQt5.uic.uiparser: push QGridLayout gridLayout_2
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QLineEdit editOutputFile
PyQt5.uic.uiparser: pop widget QLineEdit editOutputFile
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.properties: setting property orientation
PyQt5.uic.properties: setting property standardButtons
PyQt5.uic.uiparser: push QDialogButtonBox buttonBox
PyQt5.uic.uiparser: pop widget QDialogButtonBox buttonBox
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.uiparser: push QComboBox cboFileFormat
PyQt5.uic.uiparser: pop widget QComboBox cboFileFormat
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.properties: setting property sizePolicy
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QLabel label_5
PyQt5.uic.uiparser: pop widget QLabel label_5
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.properties: setting property title
PyQt5.uic.uiparser: push QGroupBox groupBox_2
PyQt5.uic.uiparser: push QGridLayout gridLayout
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QCheckBox chkDropTable
PyQt5.uic.uiparser: pop widget QCheckBox chkDropTable
PyQt5.uic.uiparser: new topwidget self.groupBox_2
PyQt5.uic.uiparser: push QHBoxLayout horizontalLayout
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QCheckBox chkSourceSrid
PyQt5.uic.uiparser: pop widget QCheckBox chkSourceSrid
PyQt5.uic.uiparser: new topwidget self.groupBox_2
PyQt5.uic.properties: setting property enabled
PyQt5.uic.properties: setting propert

Re: [QGIS-Developer] Autocomplete python code in QGIS compiled

2023-01-30 Thread matteo via QGIS-Developer

great!

On 1/30/23 00:40, Nyall Dawson wrote:

On Tue, 10 Jan 2023 at 02:13, matteo via QGIS-Developer
 wrote:


Hi all,

maybe that's a silly question, but with all the self compiled QGIS
versions that I have (3.22, 3.28, master, ecc) QGIS is not
autocompleting the code, not in the console, editor, Processing script,
macros, etc etc.

With the QGIS 3.22, but again the version seems not be the problem,
installed from packages, the autocompletion works as expected.

Is there a parameter in the cmake that I have to adjust or is this
behavior expected?


It was broken -- but has been fixed by Jürgen and is all working now.

What we need now is someone with some insight into how the 3rd party
.api files in https://github.com/qgis/QGIS/tree/master/python/qsci_apis
were generated and how we can update these to recent library
versions...

Nyall





p.s. working on a Debian Sid OS

Cheers and thanks!

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


Re: [QGIS-Developer] How to set defaults to QgsProcessingParameterMultipleLayers

2023-01-30 Thread C Hamilton via QGIS-Developer
>
> > Is there a way to automatically populate as default value of selected
> layers in QgsProcessingParameterMultipleLayers with the selected layers or
> selected groups of layers in the "Layer Panel"?  This would be incredibly
> useful.
>
> You'd (unfortunately -- it's not a trivial change) need to do this via
> a custom Processing widget wrapper, so that your parameter gets its
> own widget class where you can implement this logic.


Nyall, Is there an example somewhere on how to do a custom processing
widget wrapper?

Thanks!
___
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


Re: [QGIS-Developer] [solved] weird RuntimeError: qgis._gui cannot import type '����' from PytQT5.QtCore"

2023-01-30 Thread matteo via QGIS-Developer

Hi Evan,

thanks, it works!

Cheers

Matteo

On 1/30/23 15:45, Even Rouault via QGIS-Developer wrote:

Hi,

just to avoid other people losing a couple hours like me... If you 
update to latest master on Debian/Ubuntu, and after rebuild, you get a 
cryptic error like the following when importing qgis_gui:


# PYTHONPATH=output/python QGIS_PREFIX_PATH=output python3 -c "from 
qgis._gui import *"

Traceback (most recent call last):
   File "", line 1, in 
RuntimeError: qgis._gui cannot import type '' from PyQt5.QtCore

Then the fix is to install python3-pyqt5.qtmultimedia. Cf 
https://github.com/qgis/QGIS/commit/324dac16696bff43d637920733eb5ee4cb7b3ddf


Thanks to Alessandro for hinting me on the right direction. I'd wish 
PyQt would output a better error message...


Even


___
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] [solved] weird RuntimeError: qgis._gui cannot import type '����' from PytQT5.QtCore"

2023-01-30 Thread Even Rouault via QGIS-Developer

Hi,

just to avoid other people losing a couple hours like me... If you 
update to latest master on Debian/Ubuntu, and after rebuild, you get a 
cryptic error like the following when importing qgis_gui:


# PYTHONPATH=output/python QGIS_PREFIX_PATH=output python3 -c "from 
qgis._gui import *"

Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: qgis._gui cannot import type '' from PyQt5.QtCore

Then the fix is to install python3-pyqt5.qtmultimedia. Cf 
https://github.com/qgis/QGIS/commit/324dac16696bff43d637920733eb5ee4cb7b3ddf


Thanks to Alessandro for hinting me on the right direction. I'd wish 
PyQt would output a better error message...


Even

--
http://www.spatialys.com
My software is free, but my time generally not.

___
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


Re: [QGIS-Developer] PyQt db_manager(?) compile error

2023-01-30 Thread matteo via QGIS-Developer

Hi Richard,

same here. On Debian with a new folder and a fresh compilation. Did you 
solved?


make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:90: 
python/plugins/db_manager/ui_DlgCancelTaskQuery.py] Error 1
make[2]: *** Deleting file 
'python/plugins/db_manager/ui_DlgCancelTaskQuery.py'
make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:98: 
python/plugins/db_manager/ui_DlgCreateIndex.py] Error 1

make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateIndex.py'
make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:102: 
python/plugins/db_manager/ui_DlgCreateTable.py] Error 1

make[2]: *** Deleting file 'python/plugins/db_manager/ui_DlgCreateTable.py'
An unexpected error occurred.
Check that you are using the latest version of PyQt5 and send an error 
report to

supp...@riverbankcomputing.com, including the following information:

  * your version of PyQt (5.15.8)
  * the UI file that caused this error
  * the debug output of pyuic5 (use the -d flag when calling pyuic5)
make[2]: *** 
[python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/build.make:94: 
python/plugins/db_manager/ui_DlgCreateConstraint.py] Error 1
make[2]: *** Deleting file 
'python/plugins/db_manager/ui_DlgCreateConstraint.py'
make[1]: *** [CMakeFiles/Makefile2:6344: 
python/plugins/db_manager/CMakeFiles/zzz-db_manager-15-depend.dir/all] 
Error 2


Cheers

Matteo


On 1/27/23 13:23, Richard Duivenvoorde via QGIS-Developer wrote:

Hi,

Compiling master on Debian Testing today, I first was presented with a 
new dependency Qt5Multimedia (hopefully we can soon use QGIS as a 
Spotify client ;-) ), which was installable.


But then my (fresh) build stalls at:

[9773/9812] Generating ui_DlgAddGeometryColumn.py
FAILED: python/plugins/db_manager/ui_DlgAddGeometryColumn.py 
/home/richard/git/qgis/build/python/plugins/db_manager/ui_DlgAddGeometryColumn.py
cd /home/richard/git/qgis/build/python/plugins/db_manager && 
/home/richard/git/qgis/scripts/pyuic_wrapper.sh /usr/bin/pyuic5 
/home/richard/git/qgis/build/output/lib 
/home/richard/git/qgis/build/output/python /usr/bin/python3 
/home/richard/git/qgis/python/plugins/db_manager/ui/DlgAddGeometryColumn.ui -o /home/richard/git/qgis/build/python/plugins/db_manager/ui_DlgAddGeometryColumn.py

An unexpected error occurred.
Check that you are using the latest version of PyQt5 and send an error 
report to

supp...@riverbankcomputing.com, including the following information:

   * your version of PyQt (5.15.7)
   * the UI file that caused this error
   * the debug output of pyuic5 (use the -d flag when calling pyuic5)

Others have that issue?

Running pyuic -d on one of the errors seems fine (see below).

Regards,

Richard Duivenvoorde


/usr/bin/pyuic5 -d 
/home/richard/git/qgis/python/plugins/db_manager/ui/DlgExportVector.ui



PyQt5.uic.uiparser: uiname is DbManagerDlgExportVector
PyQt5.uic.uiparser: toplevel widget is QDialog
PyQt5.uic.properties: setting property geometry
PyQt5.uic.properties: setting property windowTitle
PyQt5.uic.uiparser: push QDialog DbManagerDlgExportVector
PyQt5.uic.uiparser: push QGridLayout gridLayout_2
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QLineEdit editOutputFile
PyQt5.uic.uiparser: pop widget QLineEdit editOutputFile
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.properties: setting property orientation
PyQt5.uic.properties: setting property standardButtons
PyQt5.uic.uiparser: push QDialogButtonBox buttonBox
PyQt5.uic.uiparser: pop widget QDialogButtonBox buttonBox
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.uiparser: push QComboBox cboFileFormat
PyQt5.uic.uiparser: pop widget QComboBox cboFileFormat
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.properties: setting property sizePolicy
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QLabel label_5
PyQt5.uic.uiparser: pop widget QLabel label_5
PyQt5.uic.uiparser: new topwidget DbManagerDlgExportVector
PyQt5.uic.properties: setting property title
PyQt5.uic.uiparser: push QGroupBox groupBox_2
PyQt5.uic.uiparser: push QGridLayout gridLayout
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QCheckBox chkDropTable
PyQt5.uic.uiparser: pop widget QCheckBox chkDropTable
PyQt5.uic.uiparser: new topwidget self.groupBox_2
PyQt5.uic.uiparser: push QHBoxLayout horizontalLayout
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QCheckBox chkSourceSrid
PyQt5.uic.uiparser: pop widget QCheckBox chkSourceSrid
PyQt5.uic.uiparser: new topwidget self.groupBox_2
PyQt5.uic.properties: setting property enabled
PyQt5.uic.properties: setting property text
PyQt5.uic.uiparser: push QLineEdit editSourceSrid
PyQt5.uic.uiparser: pop widget QLineEdit editSourceSrid
PyQt5.uic.uiparser: new topwidget self.groupBox_2
PyQt5.uic.properties: setting property text