-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
QgsLayoutExporter export png file failed. #51947
Comments
Could you please try on 3.28.3 ? |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
Re-opening. I am exporting 400 maps in an interactive Python console loop and I'm now getting this error. On MacOS, Mac M1, Sequoia 15.11, QGIS 3.40 |
@tsmcgrath, the "The PNG driver does not support update access to existing datasets." error message is thrown by the GDAL/OGR library because QgsLayoutExporter.exportToImage QGIS/src/core/layout/qgslayoutexporter.cpp Line 1746 in 6f4df5d
Since the error doesn't actually affects the exporting functionality, you can avoid it to be displayed just following the advice at https://gis.stackexchange.com/questions/360254/pyqgis-exporting-print-layout-error-6-the-png-driver-does-not-support-update as already suggested in a previous comment. Anyway, it looks like the error message doesn't show up using QGIS 3.40.2 with GDAL/OGR 3.9.3 on my Windows 10 system. Where exactly is the error message displayed on your system? |
I am using the 3.40.1 build from the conda builder releases because it runs natively on a Mac ARM: But, I have to launch QGIS from a command line and it is in that command terminal window that I see the errors scroll by when I'm running map image exports. I will see if it recurs with 3.40.2. |
Hi @rouault, do you think it would be useful and worth to wrap QGIS/src/core/layout/qgslayoutexporter.cpp Line 1746 in 6f4df5d
since it tries to open indiscriminately any file format in "update mode", while it is not possible for many of them? |
What is the bug or the crash?
env: Ubuntu 20 64bit,qgis 3.26
When I export layout to png file with qgis python ,it's can export png file successful,but png file did not draw layer from postgis,it's only draw the layer from shp file,and reported a error :
"ERROR 6: The PNG driver does not support update access to existing datasets."
export code:
exporter = QgsLayoutExporter(layout)
imageSettings=QgsLayoutExporter.ImageExportSettings()
exporter.exportToImage(os.path.join(PROJECT_PATH,outFile), imageSettings)
Steps to reproduce the issue
Versions
QGIS 3.26
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: