<?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 Arcpy scripting works in Python window but not in Script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-scripting-works-in-python-window-but-not-in/m-p/598521#M46837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Codes work in ArcMAP Python window, but error when run as a script&lt;/P&gt;&lt;P&gt;The attached codes work in Arcmap python window when I copied and passed them line by line, but error in line 65 (arcpy.Project_management) and following (when I temporarily delete the Project tool then the error raise in&amp;nbsp;AddField tool ) when I run it as a script. The error information is "&lt;/P&gt;&lt;H1&gt;RuntimeError: Object: Error in executing tool&lt;/H1&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;What is wrong with it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jan 2018 06:23:20 GMT</pubDate>
    <dc:creator>LinaMENG</dc:creator>
    <dc:date>2018-01-20T06:23:20Z</dc:date>
    <item>
      <title>Arcpy scripting works in Python window but not in Script</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-scripting-works-in-python-window-but-not-in/m-p/598521#M46837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Codes work in ArcMAP Python window, but error when run as a script&lt;/P&gt;&lt;P&gt;The attached codes work in Arcmap python window when I copied and passed them line by line, but error in line 65 (arcpy.Project_management) and following (when I temporarily delete the Project tool then the error raise in&amp;nbsp;AddField tool ) when I run it as a script. The error information is "&lt;/P&gt;&lt;H1&gt;RuntimeError: Object: Error in executing tool&lt;/H1&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;What is wrong with it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jan 2018 06:23:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-scripting-works-in-python-window-but-not-in/m-p/598521#M46837</guid>
      <dc:creator>LinaMENG</dc:creator>
      <dc:date>2018-01-20T06:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy scripting works in Python window but not in Script</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-scripting-works-in-python-window-but-not-in/m-p/598522#M46838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy.Project_management(event,windfarm,sr)&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/thread/Project_management (in_dataset, out_dataset, out_coor_system, transform_method, {in_coor_system}, {preserve_shape}, {max_deviation}, {vertical})"&gt;Project&lt;/A&gt; requires an input featureclass name and an output featureclass name.&amp;nbsp; 'windfarm' is defined as the def to run, the geodatabase and a workspace.&amp;nbsp; Try a new name like 'windfarm2' but put windfarm2 in quotes, you currently have it as a variable name and arc* is probably getting confused&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jan 2018 10:28:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-scripting-works-in-python-window-but-not-in/m-p/598522#M46838</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-20T10:28:57Z</dc:date>
    </item>
  </channel>
</rss>

