This error is actually documented on the Error: 000824 page.
The solution is to
Add the following code snippet to check-out the extension containing the tool before calling the tool for use:
import arcpy … arcpy.CheckOutExtension("[Extension name]")
The extension names are documented in the arcpy.CheckOutExtension
help. For Network Analyst use:
arcpy.CheckOutExtension("Network")