I am trying to export my utility network package via arcpy.pt.UtilityNetworkToAssetPackage(), however my initial error was:
arcgisscripting.ExecuteError: ERROR 002119: Must be connected and signed into the portal.
Failed to execute (UtilityNetworkToAssetPackage).
So I added a line before the utility network call to sign into my portal, and this error is now thrown:
ValueError: Error signing on to <myportal>.
Message : s
Details : Unable to generate token.
Anyone have any potential solutions for this kind of error?
Sample code is below:
arcpy.SignInToPortal(<portalurl>, <username>, <password>)
arcpy.pt.UtilityNetworkToAssetPackage(un, '*', dest_path, file_name, 'INCLUDE_DATA')