-
Notifications
You must be signed in to change notification settings - Fork 154
usercontent error: #359
Comments
Can you post your code so I can repo? |
I have added the codes. I found this code online. I have also tried the code available in this link (https://github.com/Esri/ArcREST). But I can only get the meta-data. Thank you import uuid InputsitemID = "" LogicCreate security handlershAGOL = arcrest.AGOLTokenSecurityHandler(username, pw) Connect to AGOLorg = arcrest.manageorg.Administration(url=url, securityHandler=shAGOL) Grab the user's content (items)content = org.content Create a export item with a random name using UUIDand export it to a zipfileresult = usercontent.exportItem(title="%s" % uuid.uuid4().get_hex(), exportedItemId = result['exportItemId'] Ensure the item is finished exporting before downloadingstatus = usercontent.status(itemId=exportedItemId, jobId=jobId, jobType="export") while status['status'].lower() == "processing": Erase the exported item to clean upAGOLusercontent.deleteItems(items=exportItem.id) |
try this:
|
**Hi Mike, Everytime i run the line "shAGOL = arcrest.AGOLTokenSecurityHandler(username, pw)" I get the following. Is it normal?** notificationsEnabled - attribute not implemented in Portal class. Also I am still getting the error for "user=content.users.user(). The error message is below: Traceback (most recent call last): **Is there any library I am missing? Please help as I am stuck with this problem for long time. Thank you for your time.** |
Update: i added ssl and managed to pass that stage. result = user.exportItem(title="%s" % uuid.uuid4().get_hex(),itemId=itemID,exportFormat=exportDataAs,exportParameters=None)
|
great, it is working. export creates an item |
But how can i get the data? |
you should be able to download it from the resulting item/ If you want to get the data without creating an item, you could look at the createReplica sample |
Can i have a sample to download from the resulting item please.. |
Hi Mike, |
no problem. If you can, I would suggest moving your processes to the Python API for ArcGIS. ArcRest still has its value if you are stuck with python 2.x. |
Hi Mike, The data in ArcGIS online has some images that does not appear in the csv file. I changed "exportDataAs = "CSV"" to "exportDataAs = "File Geodatabase"" and got the zip folder with goedatabase files. Is there a way I can save the data into MSSQL along with the image. |
You mean maintaining attachments? Not sure, this is not an arcrest issue. You need to find the correct way to do this using the rest end point you are calling. Or look at another one like create replica
Sent from my Verizon 4G LTE Droid
On Apr 24, 2018 4:22 AM, KumarSumith <[email protected]> wrote:
Hi Mike, The data in ArcGIS online has some images that does not appear in the csv file. I changed "exportDataAs = "CSV"" to "exportDataAs = "File Geodatabase"" and got the zip folder with goedatabase files. Is there a way I can save the data into MSSQL along with the image.
Thank you
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_Esri_ArcREST_issues_359-23issuecomment-2D383846565&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=hoBw6CQuytVR65zzd5i-Zw&m=Im_WnZmzQlC4D4d9GBzhG0HzkqdOTuI-Y-8lq4i3Tpg&s=8CxOaC8jPwd4RhjvgCWNf0eY3Mqw_lzOdXYzdylpVK4&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AClPVXd8u9po2sCon-2DcvKMh-5FApLTVqq9ks5truCsgaJpZM4Tc8Ni&d=DwMFaQ&c=n6-cguzQvX_tUIrZOS_4Og&r=hoBw6CQuytVR65zzd5i-Zw&m=Im_WnZmzQlC4D4d9GBzhG0HzkqdOTuI-Y-8lq4i3Tpg&s=4yi3vxd93kq7SLcOJGHOGZI0vsLE3Bvv8RM-4N59NXM&e=>.
|
I am trying to run the code to export the data from arcgis to my local PC using arcrest library but i get this error. Thanks
AttributeError: 'Content' object has no attribute 'usercontent'
ArcRest or ArcRestHelper
Version or date of download
Bug or Enhancement
Repo Steps or Enhancement details
The text was updated successfully, but these errors were encountered: