GithubHelp home page GithubHelp logo

Comments (6)

achapkowski avatar achapkowski commented on August 17, 2024

Do you have the latest version of ArcREST?

It's in there: https://github.com/Esri/ArcREST/blob/master/src/arcrest/manageorg/parameters.py

from arcrest.

geoffreywestGIS avatar geoffreywestGIS commented on August 17, 2024

Yes, the error no longer appears, can you provide an example of how ['layerinfo'] should be structured?

from arcrest.

achapkowski avatar achapkowski commented on August 17, 2024

See: http://resources.arcgis.com/en/help/arcgis-rest-api/#/Layer/02r30000004q000000/

Andrew Chapkowski | Professional Services
esri | 1325 Morris Drive, Suite 201 | Chesterbrook, PA 19087
Phone: 610-644-3374 ext. 5930 | E-mail: [email protected]:[email protected]

[DevA_EDDA]

From: Geoffrey West [mailto:[email protected]]
Sent: Wednesday, May 20, 2015 11:36 AM
To: Esri/ArcREST
Cc: Andrew Chapkowski
Subject: Re: [ArcREST] AttributeError: 'module' object has no attribute 'AnalyzeParameters' (#59)

Yes, the error no longer appears, can you provide an example of how ['layerinfo'] should be structured?


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-103929167.

from arcrest.

geoffreywestGIS avatar geoffreywestGIS commented on August 17, 2024

Not sure why it's not publishing, I intermittently receive a 500 error from addItem as mentioned in #53. Publishing and addItem appear dependent at this point as an itemAdds without issue when I omit the publish section.

print usercontent.publishItem(fileType="CSV",
publishParameters=publishParams,
itemId=itemId) does not print a result.

my ['layerinfo'] is a json that I am reading from disk as
jsonfile = 'C:\Users\GIS\Desktop\eastvalley.json'

with open(jsonfile, "r") as f:
  data = json.loads(f.read())

if 'publishParameters' in analyzeResult:
pp = analyzeResult['publishParameters']
publishParams = arcrest.manageorg.PublishCSVParameters(name=pp['CSVPublishTest'],
locationType=pp['none'],
layerInfo=pp[jsonfile])
print usercontent.publishItem(fileType="CSV",
publishParameters=publishParams,
itemId=itemId)
print 'finished'

I am using this JSON structure found http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000008q000000

{
"name": "My CSV File Dataset",
"locationType": "none",
"description": "test description",
"maxRecordCount": 500,
"copyrightText": "test copyright",
"layerInfo": {
"name": "Illinois",
"type": "Feature Layer",
"geometryType": "none",
"minScale": 0,
"maxScale": 0,
"hasAttachments": false,
"htmlPopupType": "esriServerHTMLPopupTypeNone",
"objectIdField": "GeographyId",
"globalIdField": "",
"typeIdField": "",
"fields": [
{
"name": "GeographyId",
"type": "esriFieldTypeString",
"alias": "FID",
"sqlType": "sqlTypeInteger",
"nullable": false,
"editable": false,
"domain": null
},
{
"name": "GeographyName",
"type": "esriFieldTypeString",
"alias": "Geog Name",
"nullable": false,
"editable": true,
"domain": null
},
{
"name": "GeographyType",
"type": "esriFieldTypeString",
"alias": "Geog type",
"nullable": false,
"editable": true,
"domain": null
},
{
"name": "StateAbbreviation",
"type": "esriFieldTypeString",
"alias": "State Abbr.",
"nullable": false,
"editable": true,
"domain": null
}
],
"types": [],
"templates": [],
"capabilities": "Query,Editing"
}
}

from arcrest.

MikeMillerGIS avatar MikeMillerGIS commented on August 17, 2024

I would suggest installing Fiddler and walk through the process using ArcGIS Online or Portal and see what differs from the calls you are making in ArcRest. Can you post the entire scripts and a sample CSV that we can use to repo the issue?

from arcrest.

achapkowski avatar achapkowski commented on August 17, 2024

No code posted or fiddler traffic, issue closed. Please feel free to post your issue again.

from arcrest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.