<?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: Arcpy functions that output tables fail when running from a batch file in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183116#M14079</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this line in a Try/Except function, so I always get the fail error I have in the "Except" section&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Dec 2016 16:09:50 GMT</pubDate>
    <dc:creator>DanielInterrante</dc:creator>
    <dc:date>2016-12-22T16:09:50Z</dc:date>
    <item>
      <title>Arcpy functions that output tables fail when running from a batch file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183113#M14076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having an issue trying to automate a python script that relies heavily on arcpy/ArcGIS.&amp;nbsp; I have a functioning version of the script that runs perfectly in the ArcMap Python module, that continually fails when trying to translate it to something what will run from a batch file. &amp;nbsp; I'm trying to set it up so that Windows Task Scheduler can grab it. What I've come to notice is that any function that has a table as an output (Table to Table, Copy Rows, Frequency Count, ect) fails when running from the batch.&amp;nbsp; I've been copying and pasting these directly into the desktop version with 100% success so it doesn't seem like there are typos.&amp;nbsp; Has anyone ever run into this before?&amp;nbsp; Or is there a way to automate the script to run in ArcMap rather than python.exe?&amp;nbsp; I'm working on Windows Server 2012 R2.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 15:25:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183113#M14076</guid>
      <dc:creator>DanielInterrante</dc:creator>
      <dc:date>2016-12-22T15:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy functions that output tables fail when running from a batch file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183114#M14077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does your .cmd or .bat file look like?&lt;/P&gt;&lt;P&gt;What does the error say exactly when executed from the batchfile?&amp;nbsp; (you should have some sort of logging in order to capture these types of things).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 15:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183114#M14077</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2016-12-22T15:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy functions that output tables fail when running from a batch file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183115#M14078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James, &lt;/P&gt;&lt;P&gt;As for my batch file all I have is : "start C:\Python27\ArcGIS10.4\python.exe E:\Script_Folder\Script_File.py"&lt;/P&gt;&lt;P&gt;I have logging set up with print statements before and after the line where its happening (right now I'm stuck on the Frequency Analysis).&amp;nbsp; I always get the print statement right before the function then it fails.&amp;nbsp; Are there more specific types of log functions that would be more helpful to use in this situation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:07:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183115#M14078</guid>
      <dc:creator>DanielInterrante</dc:creator>
      <dc:date>2016-12-22T16:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy functions that output tables fail when running from a batch file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183116#M14079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this line in a Try/Except function, so I always get the fail error I have in the "Except" section&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:09:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183116#M14079</guid>
      <dc:creator>DanielInterrante</dc:creator>
      <dc:date>2016-12-22T16:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy functions that output tables fail when running from a batch file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183117#M14080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think if you right-click the batch file and run as admin it should print out the execution and any errors.&amp;nbsp; Perhaps remove any try/except blocks and just let the error print out in the command window to see if you can get an actual error number to show.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 16:34:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183117#M14080</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2016-12-22T16:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy functions that output tables fail when running from a batch file</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183118#M14081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like there was a lock that was screwing things up.&amp;nbsp; I had an ArcMap window open for troubleshooting and I guess that prevented tables from functioning properly.&amp;nbsp; For whatever reason spatial feature classes were unaffected.&amp;nbsp; Than you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2016 17:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-functions-that-output-tables-fail-when/m-p/183118#M14081</guid>
      <dc:creator>DanielInterrante</dc:creator>
      <dc:date>2016-12-22T17:05:08Z</dc:date>
    </item>
  </channel>
</rss>

