<?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: ImportToolbox using Arcpy giving Syntax Error in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340356#M74256</link>
    <description>&lt;P&gt;I tried ommitting the alias and it still gives the same issue&lt;/P&gt;</description>
    <pubDate>Sun, 22 Oct 2023 22:44:14 GMT</pubDate>
    <dc:creator>YobB1n</dc:creator>
    <dc:date>2023-10-22T22:44:14Z</dc:date>
    <item>
      <title>ImportToolbox using Arcpy giving Syntax Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340341#M74254</link>
      <description>&lt;P&gt;I just started using python with Arcgis and am struggling with the basic step of importing a custom toolbox to use in my script. I've used ImportToolbox according to the documentation as such:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.ImportToolbox(r"C:\Users\matth\Documents\LAStools\LAStools\ArcGIS_toolbox\LAStools.tbx", "lastools")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in order to import the 'lastools' toolbox. I've confirmed this is the correct directory, and get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "&amp;lt;string&amp;gt;", line 4, in &amp;lt;module&amp;gt;
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 171, in ImportToolbox
    return import_toolbox(input_file, module_name)
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\toolbox_code.py", line 491, in import_toolbox
    mymodule = generate_toolbox_module(toolbox, None, False, False, False, module_name, use_alt_alias)
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\toolbox_code.py", line 464, in generate_toolbox_module
    mycode = compile(code,
  File "C:\Users\matth\Documents\LAStools\LAStools\ArcGIS_toolbox\LAStools.tbx", line 1141
    
    ^
SyntaxError: invalid syntax&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything obvious I'm doing wrong or is potentially a problem with the toolbox? Any help is appreciated, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 19:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340341#M74254</guid>
      <dc:creator>YobB1n</dc:creator>
      <dc:date>2023-10-22T19:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: ImportToolbox using Arcpy giving Syntax Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340352#M74255</link>
      <description>&lt;P&gt;If the toolbox has an alias, skip the second part of the import.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/importtoolbox.htm" target="_blank"&gt;ImportToolbox—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 21:46:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340352#M74255</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-10-22T21:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: ImportToolbox using Arcpy giving Syntax Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340356#M74256</link>
      <description>&lt;P&gt;I tried ommitting the alias and it still gives the same issue&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 22:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340356#M74256</guid>
      <dc:creator>YobB1n</dc:creator>
      <dc:date>2023-10-22T22:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: ImportToolbox using Arcpy giving Syntax Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340361#M74257</link>
      <description>&lt;P&gt;move the toolbox (and associated scripts if applicable) into a different/simpler folder&lt;/P&gt;&lt;P&gt;eg c:/tools&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 00:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/importtoolbox-using-arcpy-giving-syntax-error/m-p/1340361#M74257</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-10-23T00:27:38Z</dc:date>
    </item>
  </channel>
</rss>

