|
POST
|
Hi All, Got an odd one... I feel like I've come across something similar before but it's got me stumped right now. Quick Summary: The script tool runs successfully outside of ArcMap/Catalog via python CLI The script tool runs successfully the FIRST time run from the toolbox inside ArcMap/ArcCatalog The script tool FAILS every time after the first until ArcMap/ArcCatalog is closed and restarted The function in the script tool runs successfully if called multiple times from a second script tool during the same execution but then fails with the same pattern when run consecutively. The failure is a critical level exception exiting the script: Traceback (most recent call last): File "D:\support\arcgis\msal\doauth.py", line 21, in <module> result = get_token() File "D:\support\arcgis\msal\doauth.py", line 14, in get_token client_credential="" File "C:\Python27\ArcGIS10.6\lib\site-packages\msal\application.py", line 239, in __init__ self.http_client, validate_authority=validate_authority) File "C:\Python27\ArcGIS10.6\lib\site-packages\msal\authority.py", line 85, in __init__ self.http_client) File "C:\Python27\ArcGIS10.6\lib\site-packages\msal\authority.py", line 142, in tenant_discovery resp = http_client.get(tenant_discovery_endpoint, **kwargs) File "C:\Python27\ArcGIS10.6\lib\site-packages\requests\sessions.py", line 543, in get return self.request('GET', url, **kwargs) File "C:\Python27\ArcGIS10.6\lib\site-packages\requests\sessions.py", line 516, in request prep = self.prepare_request(req) File "C:\Python27\ArcGIS10.6\lib\site-packages\requests\sessions.py", line 455, in prepare_request headers=merge_setting(request.headers, self.headers, dict_class=CaseInsensitiveDict), File "C:\Python27\ArcGIS10.6\lib\site-packages\requests\sessions.py", line 69, in merge_setting merged_setting = dict_class(to_key_val_list(session_setting)) File "C:\Python27\ArcGIS10.6\lib\site-packages\requests\structures.py", line 46, in __init__ self.update(data, **kwargs) File "C:\Python27\ArcGIS10.6\Lib\_abcoll.py", line 564, in update if isinstance(other, Mapping): File "C:\Python27\ArcGIS10.6\Lib\abc.py", line 144, in __instancecheck__ return cls.__subclasscheck__(subtype) File "C:\Python27\ArcGIS10.6\Lib\abc.py", line 180, in __subclasscheck__ if issubclass(subclass, scls): File "C:\Python27\ArcGIS10.6\Lib\abc.py", line 180, in __subclasscheck__ if issubclass(subclass, scls): File "C:\Python27\ArcGIS10.6\lib\site-packages\typing.py", line 1410, in __subclasscheck__ return super(GenericMeta, self).__subclasscheck__(cls) TypeError: super() argument 1 must be type, not None Details: The script tool integrates data between a feature class and an external API behind an AzureAD authentication. I've installed the official Microsoft library: c:\Python27\ArcGIS10.6\Scripts\pip.exe install msal The failure is not in the actual call for an authorization token but simply in the init constructor of the 'AD App' class so I'm able to strip it down to a very basic example which is attached in the zip file: 1. doauth.py - script file with function that initializes the 'AD App' and returns a true/false if the app class is created 2. doauth2.py - script file that calls the 'create app' function inside doauth.py twice in a row This was an attempt to see if it's something with multiple instances of the app class being created or if it's something specific with how ArcMap/Catalog are running the script itself.... appears to be the latter 3. toolbox.tbx - toolbox with both scripts attached as tools To repo: 1. install msal (see above) 2. CLI tests (execution is successful, no exceptions throw, simple text output returned) c:\Python27\ArcGIS10.6\Scripts\python.exe doauth.py c:\Python27\ArcGIS10.6\Scripts\python.exe doauth2.py 3. Open ArcCatalog Browse to toolbox Execute DoAuth tool - success, close window Execute DoAuth tool - fail Close ArcCatalog Repeat Any thoughts? Thanks in advance
... View more
11-03-2020
03:29 PM
|
0
|
1
|
909
|
|
POST
|
Just in case anyone else runs across this ... apparently you can't add the extension via the 'Addin Manager/Customize' dialog. Just double-click/execute the add-in with all the arcgis apps closed. As per the doc: Install add-in - Attribute Assistant | ArcGIS Solutions RTFM ..
... View more
09-03-2020
08:53 AM
|
0
|
0
|
915
|
|
POST
|
Hi All, I've downloaded the latest version of the attribute assistant from here: Attribute Assistant | ArcGIS Solutions Requirements says: ArcMap (Standard or Advanced) 10.2.1, 10.5 - 10.8 I'm running: I get the following error: I've tried running ArcMap 'as administrator'... same result. Any ideas? Thanks Fred
... View more
09-03-2020
08:43 AM
|
0
|
1
|
931
|
|
POST
|
Hi Warren: I know this question is old, I'm tracking a similar error and found this post. I think your issue was a little different but thought I'd add a note since I was here: If folder R:\GIS\Maps is a network/mapped drive, then it won't be accessible to task the account (even if it's the same account) when running as a background task. Mapped drives are pretty much a "GUI only" thing unless your bat file/script creates it explicitly with the OS command. The task scheduler runs as your defined account but doesn't load all the GUI aspects. So when you changed the path to the UNC style "//machine/GIS/Maps", it works b/c that path is resolvable. Hope that helps someone else, back to tracking down my issue...
... View more
03-04-2020
10:25 AM
|
1
|
0
|
1169
|
|
POST
|
Hi Cameron, I was not able to solve this one. We ran into a few more issues with OpsDashboard and decided to go with a custom dashboard instead. Sorry I can't be more help. Fred
... View more
12-10-2019
07:34 AM
|
1
|
3
|
2105
|
|
POST
|
Hi All, Here's the setup: ArcGIS Server and Portal 10.7 Server is federated and designated as Hosting server Enterprise SiteA with permission for GroupA SiteA has PageA with permission for GroupA SiteA PageA has a stock webmap layout item configured to use WebmapA WebmapA is saved in Portal with permissions for GroupA WebmapA has a LayerA from MapServiceA with permissions for GroupA When I log into portal with UserA, I can navigate to, open and view WebmapA and LayerA When I log into SiteA with UserA, I can access the site, navigate to PageA, WebMapA loads but LayerA does NOT Network trace shows "Token Required" on REST endpoint for LayerA When I log into SiteA with the portal admin account, webmap and layer display fine. Seems like the whole point of having a webmap and services with permissions. Any ideas why it's not correctly applying the token or auth cookie? Thanks Fred
... View more
09-10-2019
10:05 AM
|
0
|
3
|
1539
|
|
POST
|
Glad it helped out! It does appear to be fixed at 10.7:
... View more
08-27-2019
11:43 AM
|
0
|
0
|
2108
|
|
POST
|
Hi All, We're experiencing this problem as well and it appears much worse. We can't download ANY surveys even when opening the survey app first before using the primary app. Version 3.5.176. On-premise portal 10.7. Survey forms and feature services are shared with on-premise portal using enterprise logins. Downloads fail when using enterprise or arcgis logins including the primary portal admin account.
... View more
08-06-2019
01:49 PM
|
0
|
2
|
3155
|
|
POST
|
Hi All, We have a database, services, ops-dashboard setup that collects and displays data from locations all across the US. The widgets in the ops-dashboard are tied to a date-based filter using the "TODAY" setting. The problem is the query that gets generated is TODAY for the browser not TODAY for the location being collected. Even if we convert the database time values to UTC, the queries still miss data on the ends. Ideally the "TODAY" setting would create a value that is agnostic to time-zone. We have too many locations to publish services for each location with the specific time-zone defined and that wouldn't be a very scale-able solution as locations change. Is there a way to disable the time-zone conversion details in the widget? Is there any way to specify I want "TODAY" in a specific time-zone without attaching it to the service definition? We could create this without 'much trouble' in a custom dashboard but our requirements are to use "out-of-the-box" functionality and apps only. It doesn't seem like that requirement and the functional requirements will mesh? Thanks Fred
... View more
07-17-2019
03:21 PM
|
0
|
0
|
661
|
|
POST
|
Hi All, I'm building out a bunch of Enterprise Site pages that have an embedded Ops-Dashboards. When we access the site page, we are prompted to login to the site (expected and good) and then login again to the dashboard - not excepted and not good. And even when the site page opens again in a new tab, the site has a cached login and opens the page without the login prompt but still prompts for the login on the dashboard. This seems like a bad workflow and users are definitely not going to like it. Is there a bug? Is there specific way to embedded secure content into the site page so it doesn't require two logins? Setup: Version 10.7 Separate portal/server and web-adapter machines Site and dashboard are on the same portal: Dashboard: https://myserver/portal/apps/opsdashboard/index.html#/1234 Site page: https://myserver/portal/apps/sites/#/mypage Chrome/Edge/Firefox all display the same behavior. Invalid 'X-Frame-Options' header encountered when loading ... 'ALLOW-FROM https://server' is not a recognized directive. The header will be ignored. Seems similar to this: https://community.esri.com/thread/87825 and could be that there's a new header requirement: https://stackoverflow.com/questions/30731290/how-to-set-x-frame-options-allow-from-in-nginx-correctly thanks Fred
... View more
07-11-2019
08:32 AM
|
0
|
6
|
2357
|
|
POST
|
Hi All, I'm security testing a 10.7 Enterprise deployment and came across a situation that I thought was supposed to be blocked. I thought that if the "referrer" value was set in the generateToken request, that the token would be rejected if the client request's referrer value didn't match. Am I miss understanding what that value is used for? Example: * Go to: https://<myserver>/portal/sharing/rest/generateToken - enter username and password - select Webapp URL - enter random web site value - click GenerateToken button - copy Generated Token value on response * Open a browser an incognito/in-private browser tab * Browser to any secured rest services page: ie https://<myserver>/hosted/rest/services/MyGPTools/GPServer/Tool1 - Verifiy that service is secured and redirected to portal login page * Append token to url: ie https://<myserver>/hosted/rest/services/MyGPTools/GPServer/Tool1?token={paste from response} - the default browser request does not have a referrer header value so I'm expecting the request to be blocked and redirected back to the login page. But in this test, the REST info display fine and dandy. ??? Maybe I'm simply misunderstanding what this value is used for... Thanks
... View more
06-21-2019
01:53 PM
|
0
|
1
|
738
|
|
POST
|
Yes it's python 2.7, ArcGIS 10.6.1... ArcGIS Server does not support python 3.x, Pro is not an option. Moving the logging lines does not change the result. Runs fine the first time, fails the every time after that.
... View more
05-21-2019
08:00 AM
|
0
|
1
|
1009
|
|
POST
|
Hi All, Really simple script attached to a toolbox tool: has a wrapper class to convert logging to arcpy.AddMessage. no input or output parameters has a main function that adds a single message to the window imports arcpy and logging only runs successfully the first time fails every time after that until the arcmap/arccatalog app is restarted ArcGIS Desktop 10.6.1 Zip file attached with script and toolbox. Here's the script: import arcpy
import logging
class AddMessageHandler(logging.Handler):
def emit(self, record):
log_entry = self.format(record)
arcpy.AddMessage(log_entry)
def main():
logging.debug("----this is a test----")
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
root_logger = logging.getLogger()
root_logger.addHandler(AddMessageHandler())
main() First run success: Subsequent runs fail:
... View more
05-21-2019
05:51 AM
|
0
|
3
|
1143
|
|
POST
|
Hi James, Thanks for the follow-up, sorry for the delay...spring break road trip last week. I don't think that's the scenario. The survey form is to the "table" in the feature service. No geometry should be included. But when I inspect the network traffic the survey form submits TWO records to the feature service: 1 for the table with all the user values from the form and 1 for the polygon with a 0,0 point. I don't want it to submit the record for the polygon only the table. Thanks Fred
... View more
04-03-2019
10:10 AM
|
0
|
0
|
716
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-15-2024 10:18 AM | |
| 1 | 06-05-2025 08:06 AM | |
| 1 | 04-03-2024 08:47 AM | |
| 1 | 06-12-2018 03:16 PM | |
| 1 | 09-14-2023 01:54 PM |
| Online Status |
Offline
|
| Date Last Visited |
a month ago
|