"Must be connected and signed into the portal" error when using the "Apply Asset Package" Geoprocessing Tool

1614
10
Jump to solution
01-24-2020 12:03 PM
MichaelHamsa
Occasional Contributor

Hello,

I'm in the process of setting up a new Electric Utility Network environment using the Electric Utility Network Foundations asset package and I'm running into an error when I'm applying the asset package to our enterprise geodatabase using the "Apply Asset Package" Geoprocessing tool. The error is "Must be connected and signed into the portal". I'm fairly certain I'm connected and signed into our portal and I've tried to do this a couple of times now and I've run into the problem both times now.

Any ideas would be very helpful.

Thanks,

Mike...

0 Kudos
1 Solution

Accepted Solutions
PaulLeBlanc1
Esri Contributor

This will be resolved in Pro 2.5. The check for Portal user during Import Associations is removed.

View solution in original post

0 Kudos
10 Replies
MelissaJarman
Esri Contributor

It seems like there is something that is causing the connection to portal to timeout before the asset package import is completed successfully.


I have seen some cases where the import time is increased due to open maps in your project - have you checked to ensure there are no maps in your project open?

Apply Asset Package—Tool Reference | ArcGIS Solutions 
It is recommended to close all maps in your project before running this tool. @

Electric and Gas

0 Kudos
MichaelHamsa
Occasional Contributor

Melissa,

Thank you very much for the response.

I just double checked and there are no maps opened in the ArcGIS Pro project we are using to run this Geoprocessing tool. It is basically just an empty project with 2 database connections – one connection to the asset package GDB and one connection to the enterprise geodatabase we are applying the asset package to.

Mike Hamsa

Chief Technology Officer - GeoSpatial Innovations, Inc.

P: 512-982-6735

0 Kudos
PaulLeBlanc1
Esri Contributor

This will be resolved in Pro 2.5. The check for Portal user during Import Associations is removed.

0 Kudos
MichaelHamsa
Occasional Contributor

Paul,

Thank you VERY much for the information – any idea when that release is going to be available, or if there are any workarounds we can use now in 2.4 to get past problem? We are kind of stuck right now and we’d like to get this environment setup so we can continue with our development.

Thanks again,

Mike Hamsa

Chief Technology Officer - GeoSpatial Innovations, Inc.

P: 512-982-6735

0 Kudos
PaulLeBlanc1
Esri Contributor

Here's a post on the release date

https://community.esri.com/docs/DOC-13641-arcgis-pro-roadmap-july-2019?commentID=82074#comment-82074 

There's a uniquely named "AP_Workspace" folder in the same directory as the asset package. There's a python script in there called "main.py" -- you can comment out the steps that have already succeeded and just run the remaining.

Something like this:

0 Kudos
MichaelHamsa
Occasional Contributor

Paul,

So what happening on my machine is that I go to the AP_Workspace folder, modify the main.py and comment out the steps that have already completed, then run the Apply Asset Package geoprocessing tool again. When I do that it creates a new AP_Workspace# (1, 2, 3, 4, etc, based on the number of time I run it) and it copies the original main.py script file in that new AP_Workspace folder with all the steps back in it.

I get the feeling I’m doing something wrong.

Do I need manually run that main.py script with the python console after I modify it?

Mike Hamsa

Chief Technology Officer - GeoSpatial Innovations, Inc.

P: 512-982-6735

0 Kudos
PaulLeBlanc1
Esri Contributor

The AP_Workspace is essentially an artifact from ApplyAssetPackage.

Correct, you just need to run main.py standalone. See Run stand-alone scripts—ArcPy Get Started | ArcGIS Desktop 

0 Kudos
MichaelHamsa
Occasional Contributor

Paul,

I’m not sure, but it looks like we’re getting the same error after I comment everything out up to ImportAssociations.

“Must be connected and signed into the portal”

(arcgispro-py3-clone) C:\Users\EsriVmAdmin\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone>propy.bat C:\Users\EsriVmAdmin\Documents\ArcGIS\Packages\ElectricUtilityNetwork_1f52e2\p20\AP_workspace\main.py

ImportAssociations

1/18

Traceback (most recent call last):

File "C:\Users\EsriVmAdmin\Documents\ArcGIS\Packages\ElectricUtilityNetwork_1f52e2\p20\AP_workspace\main.py", line 21, in

return lambda args: val(gp_fixargs(args, True))

arcgisscripting.ExecuteError: ERROR 002119: Must be connected and signed into the portal.

Failed to execute (ImportAssociations).

Mike Hamsa

Chief Technology Officer - GeoSpatial Innovations, Inc.

P: 512-982-6735

0 Kudos
PaulLeBlanc1
Esri Contributor

Hmm, can you try with Pro open and authenticated with your Portal?

Or, you can add the following line after `import arcpy`:

arcpy.SignInToPortal('<url>', '<user>', '<pass>')

SignInToPortal—ArcPy Functions | ArcGIS Desktop 

0 Kudos