|
POST
|
Update: I've also tried running this in the Python Window by copying and pasting my code into the window. This results in the same behavior, where the script hangs on the line where the attachment is added to the newly created feature. A keyboard interrupt will exit the code, and the email file it hangs on and any queued files will be processed correctly. To further test this, I copied all of my code into a new Notebook in Pro, making sure all functions and blocks of code appear and run in the same order as the standalone script. Running it through the Notebook, I experience no issues. Clearly there's a difference between the different run modes, but I can't figure out what it is.
... View more
08-16-2022
10:45 AM
|
0
|
0
|
1158
|
|
POST
|
I'm working on a script that I intend to run as a Windows service. The purpose of the script is to watch a folder for .msg email files, parse out their contents when they come in, and put a point on the map with all the extracted attributes. If there is an attachment, the script then attaches it to the newly created feature. Everything works great when testing in a notebook in Pro, but I get a curious issue when I test it running as a standalone script from Windows command line. What I'm experiencing is the script gets to the line where it actually adds the attachment, then it hangs until I do a keyboard interrupt. 50% of the time it will continue and finish processing the email before exiting, 30% of the time it just exits, and 20% of the time it will continue and process any additional emails without issue. It's great that I can get it going with a keyboard interrupt, but that's not a workable solution for what's supposed to be an automated process. Again, I do not experience this issue in Pro. I am making sure to run it calling the same Python environment that I'm using in the Pro project, as the module that I'm using to process the .msg files is not in the default Python environment. Here's the relevant code snippet: #create feature
newFeature = features.Feature.from_dict(msgDict)
#add feature to digsafe layer
newCall = digSafe.layers[0].edit_features(adds = [newFeature])
#if email has attachments, add to feature
if len(attachments) > 0:
filePath = attachments[0].save()
oid = newCall['addResults'][0]['objectId']
#script makes it to here then hangs
digSafe.layers[0].attachments.add(oid,filePath)
os.remove(filePath) Has anyone else experienced this issue? Is there an easy solution, or is this a software bug? I'm using Pro 3.0 pointing to a service on Portal 10.9.1 that references an enterprise geodatabase.
... View more
08-11-2022
04:49 AM
|
0
|
1
|
1200
|
|
POST
|
Is there something different with how proxies are handled between Pro 2.9 and 3.0 and/or Enteprise 10.8.1 and 10.9.1? I ask because Pro 3.0 and Enterprise 10.8.1 is the only combination of those that doesn't work.
... View more
08-04-2022
11:40 AM
|
0
|
0
|
1741
|
|
POST
|
I've found a curious apparent incompatibility between the Python API as installed with Pro 3.0 and Portal 10.8.1. When I try to search or access items, or perform admin tasks, I get permissions errors: Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403) For items, the only way to resolve this is to share the item publicly, which is not a good solution for the feature layers I'm working with. At first, I thought it might be the machine I was accessing it from, but I saw that it was working with our Dev Portal which is at 10.9.1. So I tested using another machine which still had Pro at 2.9, and it worked correctly. I then upgraded Pro on that machine to 3.0 and saw the same behavior. Is this a bug? Or is there a security setting, additional authentication step, etc, I need to be using? Here is an example of the code I'm using: from arcgis import gis
portal = gis.GIS(r'https://myserver.myCompany.com/portal', username = r'superduperuser')
portal.content.get("ebea40d5aeg1beri5h3924306fe3142f")
... View more
08-04-2022
10:48 AM
|
1
|
6
|
1772
|
|
POST
|
Update: It seems like deleting the offending feature service did not completely remedy the situation. All the backups since then have been ~15 GB. This is better than 20, but considerably larger than the ~3 that it had been. I've also discovered that the temp folder created as part of WebGISDR isn't always getting deleted, and it includes a 13 GB .dmp file in the data store db folder. It seems like the underlying DB of datastore is holding on to the space this data took up. Is there a utility to remedy that?
... View more
07-26-2022
08:51 AM
|
0
|
0
|
1686
|
|
POST
|
Hmmm.... I don't have that parameter set to anything. The only parameter I have set is X-Powered-By. I tested on my dev portal, and it works there. The HTTP Response headers are set the same. The biggest difference between the two portals is that dev is on 10.9.1. I'll also have to double-check whether the SSL certs are set up the same.
... View more
07-01-2022
04:38 AM
|
0
|
1
|
2221
|
|
POST
|
Yes, that's how I have the basemaps available in my gallery at all. The problem isn't that the maps aren't shared, it's that there's a CORS error when I try to connect to them, but only through the WebAppBuilder. And only for some of the basemaps.
... View more
06-30-2022
06:43 AM
|
0
|
1
|
2231
|
|
POST
|
The built-in application in Portal, on Enterprise 10.8.1.
... View more
06-30-2022
06:19 AM
|
0
|
3
|
2234
|
|
POST
|
I just tried that now, and it did not work. Thanks for the suggestion! Jay
... View more
06-30-2022
06:13 AM
|
0
|
5
|
2237
|
|
POST
|
I have a curious issue with the Esri basemaps in my Enterprise web apps in 10.8.1. When I add a basemap switcher widget, I only see a selection of the Esri basemaps. Everywhere else (web maps, dashboards, etc) I see this in the basemap gallery: In web app builder, I see this in the basemap widget: I'm not sure what's going on with those duplicates, either. Anyway, when I look at the developer console in my browser, I get the error : XMLHttpRequest at 'https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer?f=json' from origin 'https://myserver.mydomain.com' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.. The only thing I could find to resolve this was changing settings in Server Admin per this page: https://enterprise.arcgis.com/en/server/latest/administer/linux/restricting-cross-domain-requests-to-arcgis-server.htm but that did not resolve it. I also find it curious that it's only an issue for WebAppBuilder. Has anyone else encountered this problem? And did you find a solution?
... View more
06-28-2022
08:34 AM
|
0
|
10
|
2601
|
|
POST
|
I did figure out the culprit in the end. Using ArcGIS Monitor, I was able to pinpoint when the disk space dropped (went from ~60GB to ~45 in a few steps). I then matched that up to the last update date on the feature services and realized one of the layers was hosted that I hadn't noticed before. It turns out the person creating that layer had accidentally published it as hosted and it was already on their radar to fix it. Yet again, I'm super happy to have Monitor installed. I am still curious, though, if there are other tools available to ID large items and feature layers. Monitor helped me in this case, but it wouldn't help much if my goal was to do a targeted cleanup of older services, starting with the largest ones.
... View more
06-27-2022
07:57 AM
|
0
|
0
|
1757
|
|
POST
|
Hello, all. In process of sleuthing out a low disk space error on my Portal 10.8.1 machine, I discovered that the most recent webgisdr backup is MUCH larger than normal: Looking through what's been published or updated in the last week, I don't see any smoking guns in terms of hosted feature layers, and I don't think a couple of web apps or dashboards would do that. Is there an efficient way of determining the disk usage of Portal items? Or is this indicative of some other problem with my enterprise install? This is a single-machine deployment.
... View more
06-27-2022
05:11 AM
|
0
|
4
|
1807
|
|
POST
|
I'm trying to do what should be very simple - reverse geocode address and city info based on the location from a Map question. I've tried setting it up in the web designer and in the XLSForm, but no luck. If I ask it to return latitude or longitude, those come through just fine. My best guess is that I don't have the correct geocode service selected. I've tried making sure I have the World Geocoder selected, but that doesn't seem to work. I'm assuming there's somthing simple that I'm missing.
... View more
06-17-2022
08:03 AM
|
0
|
1
|
792
|
|
POST
|
Good to know! Thank you, I'll have to proceed with caution.
... View more
06-10-2022
07:27 AM
|
0
|
0
|
4534
|
|
POST
|
@JohannesLindner I'm just getting around to this again. I was able to use your sample code to get the intersecting plan areas, and create hyperlinks. In the new map viewer (and maybe the old one, too), you can actually get the link text without invoking the HTML editor (just put in {PlanName} in the text box, then adding the link to that text. I also extended your solution a bit by pulling the plan date in and sorting the results on that field: // Which name will be returned? Start with 1, increase for each subsequent expression
var index = 1
// get names of intersecting plan features
var plans = Intersects($feature, FeatureSetByName($datastore,"Plan Area", ["PlanName","InstallDate"], true))
// no intersecting plans or you already returned all names in previous expressions
var plans = OrderBy(plans, 'InstallDate DESC');
if(plans == null || Count(plans) < index) {
return ""
}
// return the specified name
var i = 1
for(var p in plans) {
if(i == index) {
return p.PlanName
}
i += 1
}
... View more
06-10-2022
07:19 AM
|
0
|
0
|
3364
|
| Title | Kudos | Posted |
|---|---|---|
| 9 | 08-27-2025 02:06 PM | |
| 1 | 10-22-2024 04:41 AM | |
| 2 | 01-17-2024 12:35 PM | |
| 2 | 05-18-2023 05:44 AM | |
| 1 | 04-15-2024 07:13 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|