[QGIS-Developer] WMS Request "GetPrint" to QGIS - Server fails with &ATLAS_PK

GONZALEZ FERNANDEZ ZEUS zeus.gonzalez at usc.es
Tue Jul 23 04:54:49 PDT 2019


Hi devs!

I'm a junior developer and I'm working on a project trying to refresh an old GISWEB, to do so i chose QWC2+QGISServer.

Actual setup is:

Debian 10, Apache2, QGIS-Server 3.8, using .shp as layers... the QWC2 works fine, WMS works fine, i can print some templates, print png, etc...

The issue is that I'm trying to use the &ATLAS_PK (implemented in QGIS Server 3.6<https://github.com/qgis/QGIS/commit/21e3adfbcac4ffa339b28a4fb5fefc3a704bd2fb> and I'm getting an annoying "Internal Server Error". When I use "&ATLAS_PK=1" or "&ATLAS_PK=1, 2, 3", log says:

"CRITICAL Server: An error occurred during the Atlas print
WARNING: finish() called twice"


As I read in the code here<https://github.com/qgis/QGIS/blob/master/src/server/services/wms/qgswmsrenderer.cpp> it could be caused by 2 things :

"if ( pkIndexes.size() < 1 )
    {
      throw QgsException( QStringLiteral( "An error occurred during the Atlas print" ) );
    }"


or:

"QString errorString;
    atlas->setFilterExpression( filterString, errorString );
    if ( !errorString.isEmpty() )
    {
      throw QgsException( QStringLiteral( "An error occurred during the Atlas print" ) );
    }"


I can't determine which one is causing it. (My shapes have FID field, so pkIndexes shouldn't be null)

If I try to use "&ATLAS_PK=*" it seems to work but I get "timed out" because I have like 4k features to print (I already changed the feature limit in QGIS Server conf). I'm going to try with a layer with less features as soon as I can and post updates.

GetProjectSettings WMS request returns that I have 2 templates both with atlas enabled.

There's not much documentation<https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/services.html> to read about, as it's a new feature...

The issue has nothing to do with QWC2, it's just the QGIS-Server.

ISSUE URL: https://github.com/qgis/QGIS/issues/30817

Regards,

Zeus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190723/b071d942/attachment.html>


More information about the QGIS-Developer mailing list