I have been trying to run the code on this page in a notebook;
https://developers.arcgis.com/python/guide/part2-find-routes/
it worked fine until I got to this section:
With output_name specified
I got this error using the exact code on this page.
I installed my API with ArcPro and run it from VS Code the other code before this worked just fine.

This GIS does not support spatial analysis.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<timed exec> in <module>
c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\features\use_proximity.py in plan_routes(stops_layer, route_count, max_stops_per_route, route_start_time, start_layer, start_layer_route_id_field, return_to_start, end_layer, end_layer_route_id_field, travel_mode, stop_service_time, max_route_time, include_route_layers, output_name, context, gis, estimate, point_barrier_layer, line_barrier_layer, polygon_barrier_layer, future) 1554 }
1555 params = inspect_function_inputs(
->1556 fn=gis._tools.featureanalysis._tbx.plan_routes, **kwargs
1557 )
1558 params["estimate"] = estimate
AttributeError: 'NoneType' object has no attribute '_tbx'