[QGIS-Developer] SIP 5?

2020-02-04 Thread William Kyngesburye
I just ran into a configuration problem with SIP 5 (updating my system).  cmake 
is failing to find PyQt5 with SIP 5 - it can't import sipconfig.

Looking at FindPyQt5.py, I see that it first tries importing PyQt5.pyqtconfig.  
This doesn't appear to be a normal part of Pyqt5.  The only pyqtconfig module I 
found hasn't been updated in 4 years, and when I tried putting it inside PyQt5, 
I got an error that PyQt5.pyqyconfig has no attribute Configuration, so I 
presume it's a completely different pyqyconfig than QGIS wants.

When pyqtconfig fails (not found or error), it tries importing sipconfig.  
Right there in the code a comment says this won't work for SIP 5, and indeed it 
fails, because sip 5 does not include sipconfig.

So, catch 22.  Does QGIS support SIP 5?  Install doc says >= 4.12, nothing 
about < 5.

-
William Kyngesburye



Don't Panic
___
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] Please help with the changelog for 3.12

2020-02-04 Thread Nyall Dawson
On Tue, 4 Feb 2020 at 19:21, Tim Sutton  wrote:
>
> Thanks Nyall
>
>
>
> On 2 Feb 2020, at 22:37, Nyall Dawson  wrote:
>
> On Sun, 2 Feb 2020 at 08:10, Tim Sutton  wrote:
>
>
> Hi All
>
> QGIS 3.12 will be released in 19 days and our changelog needs a lot of love 
> before that. If you are able to, please spend some time documenting new 
> features and key improvements in the changelog.
>
> https://changelog.qgis.org/en/qgis/version/3.12/
>
>
> Thanks for the heads-up Tim!
>
> I'm really busy over the next fortnight, so doubt I'll get time to do
> the initial git->changelog population (which has been done since QGIS
> 2.10 or something). Before the entries get populated in depth, we need
> a volunteer to trawl through the git changelog from the time of 3.12
> branch up to feature freeze and copy all the commits which add
> changelog worthy changes to the changelog. It can be just a direct
> copy-and-paste, leaving the cleanup for others to do later.
>
> This needs to be done first, so that we can condense similar entries
> into one and define the general outline of the changelog **before** we
> start adding screenshots and nice text.
>
>
> Is it enough to just grab the items labelled ‘Feature’ - we are planning to 
> automatically create entries from the changelog as part of the QGIS funded 
> improvements we are doing

In my experience... no. Some of us naughty developers don't always use
this tag :(

Nyall
___
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 notify an error from QgsProcessingAlgorithm.processAlgorithm ?

2020-02-04 Thread Nyall Dawson
On Wed, 5 Feb 2020 at 01:04, Jean-Charles Quillet
 wrote:
>
> Hi !
>
> I'm trying to implement a processing algorithm in Python.
>
> It's not clear how I am supposed to handle errors during the execution of the 
> algorithms. The documentation is talking about raising the exception 
> GeoAlgorithmExecutionException
> https://qgis.org/pyqgis/3.8/core/QgsProcessingAlgorithm.html#qgis.core.QgsProcessingAlgorithm.processAlgorithm

Ouch, outdated dox. This should say "QgsProcessingException". I'll fix.

> unfortunately this exception doesn't exist. I've tried to raise 
> QgsProcessingException. But from the output window, the exception does not 
> seem to be well handled. I also tried to return an empty dictionary and then 
> the output window doesn't seem to notify any problem at all. I've checked out 
> GDAL and GRASS processing plugins but they seem handle errors differently in 
> a very specific way. GDAL raise an IOError and GRASS report error with: 
> feedback.reportError

It depends on the severity of the error.
- If it's a critical error, raise QgsProcessingException. This will
completely terminate the algorithm execution, **AND TERMINATE ANY
MODEL IT IS RUNNING AS PART OF**. Be wary of raising exceptions --
don't raise them for things like "found no features in layer", because
that's potentially a situation which may arise when running an
algorithm in a model, and by raising the exception you effectively
prevent users from utilising your algorithm in their model. So you
only raise exceptions when things are definitely wrong, say for
something like "selected grouping field 'CATEGORY' does not exist in
input layer".

- Otherwise, use reportError. This doesn't terminate your algorithm
(or its parent model), but shows a warning error in the log so that
users know something unexpected happened (e.g. "found no features in
layer").

Nyall


>
> So what is the right way to handle an error in processAlgorithm ?
>
> It's important for me as I want to be able to create new models with the 
> algorithms from the graphical modeler. So if something goes wrong in the 
> middle of a set of algorithms, it definitely need to be reported correctly.
>
> Thanks for your help,
>
> Jean-Charles
>
> PS: I'm using QGIS 3.8.3-Zanzibar on Windows
> ___
> 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 notify an error from QgsProcessingAlgorithm.processAlgorithm ?

2020-02-04 Thread Etienne Trimaille
Le mar. 4 févr. 2020 à 16:04, Jean-Charles Quillet <
jeancharles.quil...@gmail.com> a écrit :

> I've tried to raise QgsProcessingException. But from the output window,
> the exception does not seem to be well handled.
>

This is, I think, the way to go. What do you mean by not well handled? You
mean the display with the traceback? This has been fixed in latest QGIS
versions. Maybe not in QGIS 3.8 which is not maintained anymore.

You should open the script template provided in QGIS Desktop :
https://github.com/qgis/QGIS/blob/master/python/plugins/processing/script/ScriptTemplate.py#L136
___
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] Plugin [1646] QWeb approval notification.

2020-02-04 Thread noreply

Plugin QWeb approval by pcav.
The plugin version "[1646] QWeb 0.2.1" is now approved
Link: http://plugins.qgis.org/plugins/QWeb/
___
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] How to notify an error from QgsProcessingAlgorithm.processAlgorithm ?

2020-02-04 Thread Jean-Charles Quillet
Hi !

I'm trying to implement a processing algorithm in Python.

It's not clear how I am supposed to handle errors during the execution of
the algorithms. The documentation is talking about raising the exception
GeoAlgorithmExecutionException
https://qgis.org/pyqgis/3.8/core/QgsProcessingAlgorithm.html#qgis.core.QgsProcessingAlgorithm.processAlgorithm

unfortunately this exception doesn't exist. I've tried to raise
QgsProcessingException. But from the output window, the exception does not
seem to be well handled. I also tried to return an empty dictionary and
then the output window doesn't seem to notify any problem at all. I've
checked out GDAL and GRASS processing plugins but they seem handle errors
differently in a very specific way. GDAL raise an IOError and GRASS report
error with: feedback.reportError

So what is the right way to handle an error in processAlgorithm ?

It's important for me as I want to be able to create new models with the
algorithms from the graphical modeler. So if something goes wrong in the
middle of a set of algorithms, it definitely need to be reported correctly.

Thanks for your help,

Jean-Charles

PS: I'm using QGIS 3.8.3-Zanzibar on Windows
___
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] Default QgsPalLayerSettings for Line layer

2020-02-04 Thread René-Luc Dhont

Hi Devs,

I would like to know how to get the default QgsPalLayerSettings values 
for a point, line or polygon layer.

Is a method exist ?
Is it defined in some comments ?

It is for fixing my PR Read SLD TextSymbolizer for lines 
https://github.com/qgis/QGIS/pull/34223


Thanks,
René-Luc
___
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] Please help with the changelog for 3.12

2020-02-04 Thread Tim Sutton
Thanks Nyall



> On 2 Feb 2020, at 22:37, Nyall Dawson  wrote:
> 
> On Sun, 2 Feb 2020 at 08:10, Tim Sutton  wrote:
>> 
>> Hi All
>> 
>> QGIS 3.12 will be released in 19 days and our changelog needs a lot of love 
>> before that. If you are able to, please spend some time documenting new 
>> features and key improvements in the changelog.
>> 
>> https://changelog.qgis.org/en/qgis/version/3.12/
>> 
> 
> Thanks for the heads-up Tim!
> 
> I'm really busy over the next fortnight, so doubt I'll get time to do
> the initial git->changelog population (which has been done since QGIS
> 2.10 or something). Before the entries get populated in depth, we need
> a volunteer to trawl through the git changelog from the time of 3.12
> branch up to feature freeze and copy all the commits which add
> changelog worthy changes to the changelog. It can be just a direct
> copy-and-paste, leaving the cleanup for others to do later.
> 
> This needs to be done first, so that we can condense similar entries
> into one and define the general outline of the changelog **before** we
> start adding screenshots and nice text.

Is it enough to just grab the items labelled ‘Feature’ - we are planning to 
automatically create entries from the changelog as part of the QGIS funded 
improvements we are doing

https://github.com/kartoza/prj.app/issues/1128 


But I was planning to set it up from after 3.12 goes out. @Anita Hapsari can 
you whip up something to pull all the entries out for us from over the 3.12 
development period?

Regards

Tim


> 
> Any volunteers?
> 
> Nyall

—









Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org

Visit http://kartoza.com  to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux 
IRC: timlinux on #qgis at freenode.net

I'd love to connect. Here's my calendar link  to 
make finding time easy.

___
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] QGIS Server: warnings vs info

2020-02-04 Thread David Marteau

Hi,

Yes, there is some log messages that are not output with the correct log 
level, should be fixed in near future.


Le 03/02/2020 à 19:26, Tomas Straupis a écrit :

Hello

   While reading QGIS Server logs I wonder if this has some idea or is an error.

   After QGIS Server starts running ok I assume it is normal to change
QGIS_SERVER_LOG_LEVEL to 1 - do not show INFO type messages which
quickly go into hundreds of megs of text on a busy server.
   But if I understand correctly, some messages go into incorrect
levels thus both adding unnecessary info messages as well as hiding
important info.

   For example:
   1. Excessive warning level messages include:
   * formatString is: image/png (server/qgsrequesthandler.cpp)
   * Adding service SampleService 1.0, WCS 1.0.0 etc. etc.
(servce/qgsserviceregistry.cpp)

   2. Missing important info message:
   * The layer 'ABC' does not
exist. (services/wms/qgswmsserviceexception.h)

   Am I missing something?

   Thank you


--

David Marteau
Responsable Infrastructure
www.3liz.com 

*Tel*. 06 63 02 89 83
*Bureau*
31, rue de l'Argenterie
34000 Montpellier
*Siège social*
73, allée Kleber
Boulevard de Strasbourg
34000 Montpellier

___
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] QGIS Server: warnings vs info

2020-02-04 Thread Paul Blottiere

Hello Tomas,


> Am I missing something?

No you're right. I'm taking a look to fix that.

Thanks for raising the issue!


Regards.

Paul Blottiere




On 2/3/20 7:26 PM, Tomas Straupis wrote:

Hello

   While reading QGIS Server logs I wonder if this has some idea or is an error.

   After QGIS Server starts running ok I assume it is normal to change
QGIS_SERVER_LOG_LEVEL to 1 - do not show INFO type messages which
quickly go into hundreds of megs of text on a busy server.
   But if I understand correctly, some messages go into incorrect
levels thus both adding unnecessary info messages as well as hiding
important info.

   For example:
   1. Excessive warning level messages include:
   * formatString is: image/png (server/qgsrequesthandler.cpp)
   * Adding service SampleService 1.0, WCS 1.0.0 etc. etc.
(servce/qgsserviceregistry.cpp)

   2. Missing important info message:
   * The layer 'ABC' does not
exist. (services/wms/qgswmsserviceexception.h)

   Am I missing something?

   Thank you


___
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