2

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) 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 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.

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 to read about, as it's a new feature...

UPDATE: I tried to use atlas_pk with postgis data instead of .shp data and it works perfectly. if I have time I'll try to check if it's a problem with the .shp data or with the implementation of the atlas_pk that doesn't allow the use of .shp data.

  • can you reproduce the issue without QWC2, just using http requests? If yes, please submit an issue in QGIS github. Else, it might be a QWC2 issue. Not sure at this stage. Thanks! – rha Jul 18 '19 at 20:02
  • The issue is without QWC2, just using QGIS-Server and doing a GetPrint WMS request. – Sueps Jul 19 '19 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.