POST
|
I am encountering the same issue uploading a zipped FGDB to overwrite a hosted feature layer. "Exception: A general error occurred: string longer than 2147483647 bytes" When I limited my test data to reduce the number of features, the size was kept the size down and the script worked flawlessly. The zipped FGDB with the entire dataset is 3.6GB and the exact same identical code fails. This is just plain unacceptable behavior for a problem reported over 2 years ago.
... View more
06-14-2022
08:55 PM
|
0
|
0
|
827
|
POST
|
Looks like this can actually be done in ArcGIS Online Assistant in a fairly un-user-friendly fashion by viewing and editing Web Mapping Applications' JSON. It seems to work, but it's unsupported and a little dangerous. Using the same method that AGO Assistant does, I may be able to get my Python script to do the job.
... View more
09-12-2018
01:37 PM
|
0
|
1
|
491
|
POST
|
I have a bunch of web mapping applications that have been copied from one portal into another. In the process, the URL for the Web Map that backs the web mapping application is simply copied from the source portal. I need to be able to modify the URL of the Web Map in the destination portal's Web Mapping Application. I have searched high and low and cannot find out how one would accomplish this. ArcGIS Online Assistant doesn't do it, and I would prefer to do it via Python anyway, whether through the ArcGIS API for Python or via the REST API. I thought I was making progress by getting the item's data from the source ( the_item.get_data() from the API for Python), editing it, and then publishing it. I am using some code from Esri found on the 'net, with a function that adds the item, but it also needed the item's description which is obtained via the REST API at the ../sharing/rest/content/items/itemID endpoint of the source Web Mapping App. I then edit that description dictionary and add the item to the destination portal via the code from Esri, but I can't figure out how to set the new Web Mapping App's web map URL without ruining the URL for the Web Mapping App itself. It ends up using the same URL for both the Web Map AND the Web Mapping Application, which means if you click "View Application" on the new Web Mapping Application it actually takes you to the Web Map's URL instead of opening the Web Mapping Application. Here's the function I use to get the source item's description: def addItem(username, folder, description, data, portalUrl, token, thumbnailUrl=''): '''Creates a new item in a user's content.''' description = json.dumps(description).replace('None', '') parameters = urllib.parse.urlencode({'item': json.loads(description)['title'],'text': data, 'overwrite': 'true', 'thumbnailurl': thumbnailUrl, 'token' : token, 'f' : 'json'}) postParameters = urllib.parse.urlencode(json.loads(description)) + '&' + parameters postParameters = postParameters.encode("utf-8") the_request = urllib.request.urlopen(portalUrl + '/sharing/rest/content/users/' + username + '/' + folder + '/addItem?', postParameters) response = the_request.read() return response Since documentation is not exactly user friendly and examples are nonexistent I'm not sure I was even on the right track. Maybe there's a far easier way to do this. I'm all ears!
... View more
09-05-2018
04:52 PM
|
0
|
2
|
773
|
POST
|
Changing the target version to 10.2 has no effect - same error message. I'm not having trouble getting the tools to execute. I'm having troubles with one method of installation not working properly. Coincidentally, it's the only method I have available to allow users to install the Add-In themselves in a Citrix published app environment without involving a sys admin. My issue is that if ArcMap is accessed as a published Citrix app, users cannot install the Add-In by double-clicking. The way they should be able to install it is through the ArcMap Add-In Manager or Customize Dialog but that appears to be broken, giving me the error I mention above. The only working option I have is by manually copying the .esriaddin file into the proper user roaming profile folder, which the users cannot do themselves. Either that, or customize the Add-in manager to look in a specific folder somewhere for Add-ins, which isn't technically an installation and is subject to people accidentally messing around with files/folders.
... View more
11-28-2016
02:14 PM
|
0
|
1
|
440
|
POST
|
I have a Python add-in for ArcMap that I wrote that has a single toolbar with a couple of buttons on it. The config.xml is set to target ArcGIS 10.1. If I install the add-in by double-clicking it, it installs and works just fine. The problem is, the clients use Citrix, so they can't double-click the add-in to install it into their roaming profile. When I attempt to install the add-in via the Customize dialog in ArcMap, I get the following error message: "No GUI components found in this Add-In. Add-In version does not match". I'm seeing this in Version 10.3.1 and 10.4. It was written on a machine running 10.3.1, but as I said has the target version set to 10.1 in the config.xml file. It doesn't matter whether I directly open the Customize dialog from the ArcMap menu or whether I open it via the Add-In manager. Adding the Add-In from file in the Customize dialog always results in this error message. What do I do to get around this? Is this a bug?
... View more
11-28-2016
01:00 PM
|
1
|
3
|
1375
|
POST
|
My understanding is that you can use an in_memory feature layer as an input to a project tool, but not an output. I don't see anything in the documentation that indicates you cannot send the results of a arcpy.Project_management operation to an in-memory feature class. Just specify your output as "in_memory\\reprojected" or something similar. When you're done with it, if you want to manually clear it out of memory, just use the arcpy.Delete_management tool, specifying it exactly as in the project tool. Of course, just because the documentation doesn't say anything about requiring a physical storage output doesn't mean it isn't true. You're just gonna have to try it!
... View more
08-12-2011
07:00 PM
|
0
|
0
|
620
|
POST
|
Stick an r in front of !HYPERLINK! to tell it to parse it as a raw string instead of a normal string where backslashes are considered special characters. Either that or you can add another backslash where you currently have single backslashes. The backslash \ character is the escape character in Python strings. To get a backslash in a string you have to escape then backslash, so single string backslashes have to be converted to double backslashes in order for the actual string to have only one backslash character. Ex: The string "C:\Python.exe" will cause errors since you don't want an escape P character (whatever that is). Convert the string to "C:\\Python.exe" and the actual string stored will have just the single backslash as you want.
... View more
08-12-2011
06:41 PM
|
0
|
0
|
487
|
Title | Kudos | Posted |
---|---|---|
1 | 11-28-2016 01:00 PM |
Online Status |
Offline
|
Date Last Visited |
10-11-2023
08:19 PM
|