<?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: Pylance / VSCode linting issues with arcpy.nax module in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1644756#M9123</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/101257"&gt;@MelindaMorang&lt;/a&gt;&amp;nbsp;, I am using Pro 3.5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm definitely still able to run the files; it's more an inconvenience than anything, and I tend to rely on linting more when exploring new patterns (such this this module).&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 22 Aug 2025 17:16:37 GMT</pubDate>
    <dc:creator>tcrammond</dc:creator>
    <dc:date>2025-08-22T17:16:37Z</dc:date>
    <item>
      <title>Pylance / VSCode linting issues with arcpy.nax module</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1643024#M9109</link>
      <description>&lt;P&gt;I am trying to develop some routing scripts using the arcpy.nax module, which was portrayed as being much better than the old arcpy.na module.&lt;/P&gt;&lt;P&gt;However, when I try to access any members of the module, Pylance complains with a "Not a known member" error.&lt;/P&gt;&lt;P&gt;As a tester, I copied the script on the Service Areas page, but am still having the same issue. Has anyone else run into this? I'm happy to continue developing against the older na module; however we'd like to migrate at some point.&lt;/P&gt;&lt;P&gt;The exact error is:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;"MakeNetworkDatasetLayer" is not a known member of module "arcpy.nax" Pylance(reportGeneralTypeIssues)&lt;/LI-CODE&gt;&lt;P&gt;Here's the code (from the docs), and the error screenshot is attached.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# An example showing how to perform service area analysis using a feature class for input facilities.
import arcpy
arcpy.CheckOutExtension("network")

nds = "C:/data/NorthAmerica.gdb/Routing/Routing_ND"
nd_layer_name = "Routing_ND"
input_facilities = "C:/data/io.gdb/Facilities"
output_polygons = "C:/data/io.gdb/ServiceAreaPolygons"

# Create a network dataset layer and get the desired travel mode for analysis
arcpy.nax.MakeNetworkDatasetLayer(nds, nd_layer_name)
nd_travel_modes = arcpy.nax.GetTravelModes(nd_layer_name)
travel_mode = nd_travel_modes["Driving Time"]

# Instantiate a ServiceArea solver object
service_area = arcpy.nax.ServiceArea(nd_layer_name)
# Set properties
service_area.timeUnits = arcpy.nax.TimeUnits.Minutes
service_area.defaultImpedanceCutoffs = [5, 10, 15]
service_area.travelMode = travel_mode
service_area.outputType = arcpy.nax.ServiceAreaOutputType.Polygons
service_area.geometryAtOverlap = arcpy.nax.ServiceAreaOverlapGeometry.Split
# Load inputs
service_area.load(arcpy.nax.ServiceAreaInputDataType.Facilities, input_facilities)
# Solve the analysis
result = service_area.solve()

# Export the results to a feature class
if result.solveSucceeded:
    result.export(arcpy.nax.ServiceAreaOutputDataType.Polygons, output_polygons)
else:
    print("Solve failed")
    print(result.solverMessages(arcpy.nax.MessageSeverity.All))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 21:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1643024#M9109</guid>
      <dc:creator>tcrammond</dc:creator>
      <dc:date>2025-08-18T21:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pylance / VSCode linting issues with arcpy.nax module</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1643713#M9111</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/802623"&gt;@tcrammond&lt;/a&gt;.&amp;nbsp; Sorry about this.&amp;nbsp; Unfortunately many of the arcpy modules don't behave nicely with linters, for a variety of technical reasons.&amp;nbsp; I will investigate this and see what options we have for improving the experience.&amp;nbsp; However, regardless of what Pylance is telling you, the module should still work as documented when the code is run.&lt;/P&gt;&lt;P&gt;Could you please tell me what version of ArcGIS Pro you're running?&amp;nbsp; I know we made some improvements to arcpy.nax linting and type hinting in the 3.2 release, but it may have been in a limited area.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 13:15:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1643713#M9111</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2025-08-20T13:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pylance / VSCode linting issues with arcpy.nax module</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1644756#M9123</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/101257"&gt;@MelindaMorang&lt;/a&gt;&amp;nbsp;, I am using Pro 3.5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm definitely still able to run the files; it's more an inconvenience than anything, and I tend to rely on linting more when exploring new patterns (such this this module).&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 17:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/pylance-vscode-linting-issues-with-arcpy-nax/m-p/1644756#M9123</guid>
      <dc:creator>tcrammond</dc:creator>
      <dc:date>2025-08-22T17:16:37Z</dc:date>
    </item>
  </channel>
</rss>

