<?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: Error when trying to run Script made from ModelBuilder in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332243#M25871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take the hyphens out see below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;MAP_Feb_15_2016_-_Copy_xls&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;MAP_Feb_15_2016__Copy_xls&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 19:47:39 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2016-04-06T19:47:39Z</dc:date>
    <item>
      <title>Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332240#M25868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to run a python script and am getting an error.&amp;nbsp; I built a model in Model Builder, and when I run the model in ModelBuilder it works just fine.&amp;nbsp; I then exported it to a python script (.py) and am trying to get it to run in python, but when I do I get an error messages stating "There's an error in your program: *** can't assign to operator (Schools_Excel.py, line 14).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me and let me know what I may be doing wrong after I export the Model to a python script and then run it in python?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 17:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332240#M25868</guid>
      <dc:creator>ISP_graynic</dc:creator>
      <dc:date>2016-04-06T17:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332241#M25869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a copy of the script would be useful to narrow down the problem.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 17:48:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332241#M25869</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-06T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332242#M25870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a copy of the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# ---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;# Schools_Excel.py&lt;/P&gt;&lt;P&gt;# Created on: 2016-04-06 11:30:27.00000&lt;/P&gt;&lt;P&gt;#&amp;nbsp;&amp;nbsp; (generated by ArcGIS/ModelBuilder)&lt;/P&gt;&lt;P&gt;# Description:&lt;/P&gt;&lt;P&gt;# ---------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;/P&gt;&lt;P&gt;MAP_Feb_15_2016_-_Copy_xls = "D:\\Schools\\MEMBERSHIP\\MAP Feb 15 2016 Application Status for Program - Copy.xls"&lt;/P&gt;&lt;P&gt;O_MembersExcel = "D:\\MY FILES\\Studies\\Schools\\Schools.gdb\\O_MembersExcel"&lt;/P&gt;&lt;P&gt;IllinoisCity_AddressLocator = "D:\\MY FILES\\Basic Map Data\\IllinoisCity_AddressLocator"&lt;/P&gt;&lt;P&gt;O_Members = "D:\\MY FILES\\Studies\\Schools\\Schools.gdb\\O_Members"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Excel To Table&lt;/P&gt;&lt;P&gt;arcpy.ExcelToTable_conversion(MAP_Feb_15_2016_Application_Status_for_Program_-_Copy_xls, O_MembersExcel, "O")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Geocode Addresses&lt;/P&gt;&lt;P&gt;arcpy.GeocodeAddresses_geocoding(FOUO_MembersExcel, IllinoisCity_AddressLocator, "City City VISIBLE NONE;State State VISIBLE NONE", O_Members, "STATIC")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 19:04:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332242#M25870</guid>
      <dc:creator>ISP_graynic</dc:creator>
      <dc:date>2016-04-06T19:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332243#M25871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take the hyphens out see below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;MAP_Feb_15_2016_-_Copy_xls&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;MAP_Feb_15_2016__Copy_xls&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 19:47:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332243#M25871</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-04-06T19:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332244#M25872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Wes.&amp;nbsp; I did that and it got past line 14, but then gave me this error mesage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "D:\MY FILES\Scripts\Schools_Excel.py", line 23, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GeocodeAddresses_geocoding(FOUO_MembersExcel, IllinoisCity_AddressLocator, "City City VISIBLE NONE;State State VISIBLE NONE", O_Members, "STATIC")&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\geocoding.py", line 212, in GeocodeAddresses&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/P&gt;&lt;P&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;/P&gt;&lt;P&gt;ERROR 000725: Output Feature Class: Dataset D:\MY FILES\Studies\Schools\Schools.gdb\O_Members already exists.&lt;/P&gt;&lt;P&gt;Failed to execute (GeocodeAddresses).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 19:54:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332244#M25872</guid>
      <dc:creator>ISP_graynic</dc:creator>
      <dc:date>2016-04-06T19:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332245#M25873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you've run this process already the data already exists. Could you rename your output or rename the file you've already created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 19:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332245#M25873</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-04-06T19:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332246#M25874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The goal is to update the layer on a regular basis, so I would like to just overwrite the data with newly geocoded data.&amp;nbsp; Do you know if there is a way I can overwrite the layer instead of creatinga&amp;nbsp; whole new file?'&lt;/P&gt;&lt;P&gt;I really appreciate your help!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 20:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332246#M25874</guid>
      <dc:creator>ISP_graynic</dc:creator>
      <dc:date>2016-04-06T20:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332247#M25875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the below, i would make sure it was working ad expected first unless you don't care or have a copy of the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;Forgot to mention put this line near the top of your script but below import arcpy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 20:08:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332247#M25875</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-04-06T20:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error when trying to run Script made from ModelBuilder</title>
      <link>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332248#M25876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Wes.&amp;nbsp; It didn't originally work, but when I added .env. before the overwrite function it worked (arcpy.env.overwriteOutput = True)!&lt;/P&gt;&lt;P&gt;Thank you again so much for all the help!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 20:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-when-trying-to-run-script-made-from/m-p/332248#M25876</guid>
      <dc:creator>ISP_graynic</dc:creator>
      <dc:date>2016-04-06T20:45:38Z</dc:date>
    </item>
  </channel>
</rss>

