A general error occurred: Could not login using Pro authencation.Please verify in Pro that you are logged in.

514
4
12-10-2023 11:08 PM
WengNg
by
New Contributor III

Hi,

I've got a Python script running in a loop to create offline managed areas using and it appears to work until it errors out after successfully creating several managed areas with the following error :

"A general error occurred: Could not login using Pro authencation.Please verify in Pro that you are logged in"

As you can imagine, I used the GIS("pro") method to authenticate to our Enterprise Portal. I've tried running it several times and the script definitely works until it hits this error. I checked my ArcGIS Pro and it definitely was still connected, working and licensed.

I temporarily changed it to built-in account and the script ran successfully to completion but I'm unable to use this method in a production environment.

I suspect it could have something to do with a timeout of some sort.... does anyone else have this issue?

Using :

ArcGIS Pro 3.1.0

ArcGIS Python API 2.1.0.3

0 Kudos
4 Replies
BijanTaheri
New Contributor II

Couldn't you just input credentials into the GIS function, instead of "pro"?

GIS(portal_url, portal_username, portal_password)
0 Kudos
DavidPike
MVP Frequent Contributor

That would be a built-in account.

0 Kudos
DavidPike
MVP Frequent Contributor

Have you set as Active Portal? (right-click)

0 Kudos
WengNg
by
New Contributor III

Yeah, I did. The script runs fine until it reached a certain time period and the error "A general error occurred: Could not login using Pro authencation.Please verify in Pro that you are logged in" appears.

I also tried to 're-authenticate' by adding GIS ("pro") inside the loop instead of outside but that also did not work. I wonder how the GIS("pro") method is actually authenticating behind the scenes.....

0 Kudos