Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not create print device" when theme names include / #51480

Closed
2 tasks done
chollinger93 opened this issue Jan 15, 2023 · 0 comments · Fixed by #51633
Closed
2 tasks done

"Could not create print device" when theme names include / #51480

chollinger93 opened this issue Jan 15, 2023 · 0 comments · Fixed by #51633
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@chollinger93
Copy link

chollinger93 commented Jan 15, 2023

What is the bug or the crash?

GUI: "Could` not create print device"

When opened from terminal:

ERROR 4: sqlite3_open(/tmp/QGIS3-GRvDAa/REDACTED_9f669f06_25ba_43e5_8aa1_7dac2c2404e0Survey w/ Sites.gpkg) failed: unable to open database file
D-Bus Error: "org.freedesktop.DBus.Error.ServiceUnknown"

Note the theme name "Survey w/ Sites"

Steps to reproduce the issue

flatpak run org.qgis.qgis # don't see how using flatpak would change anything, but just for the record
wget http://qgis.org/downloads/data/qgis_sample_data.zip
unzip *.zip
  1. Open qgis_sample_data/projects/relations.qgs
  2. Add a Theme called "Theme"
  3. De-select the "airports" layer and add a theme called "Theme w/ bad path escape"
  4. Project -> Layout Manager -> Create -> Add Map
  5. Export as PDF, called sample.pdf
  6. Settings as in the screenshot below -> Save

image

Results in

image

Warning: Logged warning: Loading a file that was saved with an older version of qgis (saved in 2.2.0-Valmiera, loaded in 3.28.0-Firenze). Problems may occur.
Warning: Logged warning: Loading a file that was saved with an older version of qgis (saved in 2.2.0-Valmiera, loaded in 3.28.0-Firenze). Problems may occur.
ERROR 4: sqlite3_open(/tmp/QGIS3-kBScqL/regions20140502145258447Theme w/ bad path escape.gpkg) failed: unable to open database file

Now, rename said Layer to "Theme w bad path escape" (or do not select it when exporting) and the export will succeed

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.28.0-Firenze QGIS code branch Release 3.28
Qt version 5.15.6
Python version 3.9.9
GDAL/OGR version 3.5.2
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.11.0-CAPI-1.17.0
SQLite version 3.36.0
PDAL version 2.4.3
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.5
QScintilla2 version 2.11.6
OS version KDE Flatpak runtime
       
Active Python plugins
OSMDownloader 1.0.3
QuickOSM 2.1.1
quick_map_services 0.19.32
openlayers_plugin 2.0.0
osminfo 0.7.1
db_manager 0.1.20
MetaSearch 0.3.6
grassprovider 2.12.99
sagaprovider 2.12.99
processing 2.12.99
QGIS version 3.28.0-Firenze QGIS code branch [Release 3.28](https://github.com/qgis/QGIS/tree/release-3_28) Qt version 5.15.6 Python version 3.9.9 GDAL/OGR version 3.5.2 PROJ version 8.2.1 EPSG Registry database version v10.041 (2021-12-03) GEOS version 3.11.0-CAPI-1.17.0 SQLite version 3.36.0 PDAL version 2.4.3 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.5 QScintilla2 version 2.11.6 OS version KDE Flatpak runtime

Active Python plugins
OSMDownloader
1.0.3
QuickOSM
2.1.1
quick_map_services
0.19.32
openlayers_plugin
2.0.0
osminfo
0.7.1
db_manager
0.1.20
MetaSearch
0.3.6
grassprovider
2.12.99
sagaprovider
2.12.99
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

If I had to make an uneducated guess, I think that / will be interpreted as a part of the path and not escaped properly somewhere? My knowledge of C and Cpp is absolutely rudimentary though, so I'm not 100% sure if I can verify that. :)

This also happens with my own projects that don't get the Warning: Logged warning: Loading a file that was saved with an older version of qgis (saved in 2.2.0-Valmiera, loaded in 3.28.0-Firenze). Problems may occur. log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants