<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Export layout to jpeg in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021601#M59689</link>
    <description>&lt;P&gt;Well,&amp;nbsp; putting that string into python and trying to print it raises an unicode error in python 3.6.&amp;nbsp; It printed when I treated it as a raw string and used formatting.&amp;nbsp; Used some dummy values since I don't know what your row.society or row.FID is.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(r'C:\Users\JOE\Desktop\maps\DUNKWA A\{}{}.jpg'.format(str('Geo'), str('net')))

print(r'C:\Users\JOE\Desktop\maps\DUNKWA A\{}{}.jpg'.format(str(row.SOCIETY), str(row.FID)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;prints:&amp;nbsp; C:\Users\JOE\Desktop\maps\DUNKWA A\Geonet.jpg&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2021 17:00:41 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-01-29T17:00:41Z</dc:date>
    <item>
      <title>Export layout to jpeg</title>
      <link>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021476#M59685</link>
      <description>&lt;P&gt;I want to export my layout to jpeg using arcpy but I was getting this error "Runtime error&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 22, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\utils.py", line 182, in fn_&lt;BR /&gt;return fn(*args, **kw)&lt;BR /&gt;File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\mapping.py", line 1026, in ExportToJPEG&lt;BR /&gt;layout.exportToJPEG(*args)&lt;BR /&gt;File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\utils.py", line 182, in fn_&lt;BR /&gt;return fn(*args, **kw)&lt;BR /&gt;File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\arcobjects\mixins.py", line 608, in exportToJPEG&lt;BR /&gt;return self._arc_object.exportToJPEG(*args)&lt;BR /&gt;AttributeError: PageLayoutObject: Error in executing ExportToJPEG". I change the path to different folder and it worked. I am now getting the same errors again. What could be the cause and any workaround?&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 13:40:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021476#M59685</guid>
      <dc:creator>Official4</dc:creator>
      <dc:date>2021-01-29T13:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Export layout to jpeg</title>
      <link>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021498#M59687</link>
      <description>&lt;P&gt;If you share your code, we can provide better help.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 14:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021498#M59687</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-29T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Export layout to jpeg</title>
      <link>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021507#M59688</link>
      <description>&lt;P&gt;outpath = 'C:\Users\JOE\Desktop\maps\DUNKWA A/' + str(row.SOCIETY) + str(row.FID) + '.jpg'&lt;BR /&gt;arcpy.mapping.ExportToJPEG(mxd,outpath)&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 14:39:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021507#M59688</guid>
      <dc:creator>Official4</dc:creator>
      <dc:date>2021-01-29T14:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Export layout to jpeg</title>
      <link>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021601#M59689</link>
      <description>&lt;P&gt;Well,&amp;nbsp; putting that string into python and trying to print it raises an unicode error in python 3.6.&amp;nbsp; It printed when I treated it as a raw string and used formatting.&amp;nbsp; Used some dummy values since I don't know what your row.society or row.FID is.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print(r'C:\Users\JOE\Desktop\maps\DUNKWA A\{}{}.jpg'.format(str('Geo'), str('net')))

print(r'C:\Users\JOE\Desktop\maps\DUNKWA A\{}{}.jpg'.format(str(row.SOCIETY), str(row.FID)))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;prints:&amp;nbsp; C:\Users\JOE\Desktop\maps\DUNKWA A\Geonet.jpg&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 17:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021601#M59689</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-29T17:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Export layout to jpeg</title>
      <link>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021729#M59695</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When using arcpy and python, make sure that you add r'' ('raw string') before the path. so for example:&lt;/P&gt;&lt;P&gt;outputpath = r'C:\Temp\MyFolder'&lt;/P&gt;&lt;P&gt;You coul also write like this:&lt;/P&gt;&lt;P&gt;outputpath = "C:\\Temp\\MyFolder"&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;outputpath = 'C:/Temp/MyFolder'&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 20:25:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-layout-to-jpeg/m-p/1021729#M59695</guid>
      <dc:creator>Tomasz_Tarchalski</dc:creator>
      <dc:date>2021-01-29T20:25:26Z</dc:date>
    </item>
  </channel>
</rss>

