Why does exportToPDF cause "libpng error: Not a PNG file"?

348
5
12-18-2020 10:24 AM
ArwenVaughan1
New Contributor II

 

I am using the exportToPDF function to export a layout to PDF and after each successful export the lines below are written to standard output. As far as I know there is no actual error or problem. Does anyone know how to avoid getting this output, which fills up your Std Out and/or log files?

"libpng error: Not a PNG file"

"libpng error: Not a PNG file"

"libpng error: Not a PNG file"

"libpng error: Not a PNG file"

"libpng error: Not a PNG file"

 

Tags (3)
0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

What version of arcgis pro or arcmap are you using? (it determines the version of arcpy)


... sort of retired...
0 Kudos
ArwenVaughan1
New Contributor II

Hi Dan. I am using 2.6.2 currently. Any thoughts? I may try upgrading to 2.7 and see what happens.

0 Kudos
DanPatterson
MVP Esteemed Contributor

Before you leap!  Compare libpng versions using conda or your python list in the Project backstage.

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda list libpng
# packages in environment at C:\arc_pro\bin\Python\envs\arcgispro-py3:
#
libpng 1.6.37 h2a8f88b_0


... sort of retired...
0 Kudos
ArwenVaughan1
New Contributor II

OK, here are my results...same...it looks like

# packages in environment at C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3:
#
libpng 1.6.37 h2a8f88b_0

0 Kudos
DanPatterson
MVP Esteemed Contributor

Then don't go upgrading on a Friday... see if there was a bug in the first place and if so, see if it has been fixed

Release notes for ArcGIS Pro 2.7—ArcGIS Pro | Documentation

Then prepare for an upgrade on monday (there are a few "experiences" on upgrading to 2.7 you might want to look for over the weekend)


... sort of retired...
0 Kudos