How to Publish a Spatially Enabled Dataframe on AGOL?

206
2
01-29-2020 04:33 PM
MarkFavorito
New Contributor

I am currently trying to publish a SEDF on AGOL but am unable to do so. I have been referring to the documentation, and have been using df.spatial.to_featurelayer() to no avail. Here is my code:

mygis = GIS(website, username,  password)

loc_lyr = loc_nyc_sdf.spatial.to_featurelayer(title='locations', gis=mygis)

And here is the error that I receive:

TypeError: expected str, bytes or os.PathLike object, not int

Interestingly, when I remove the 'gis=' part, I get a syntax error, and when I write out the full GIS(website, username,  password), I get the same TypeError as when I call it as a variable.

Any help is greatly appreciated!

Reply
0 Kudos
2 Replies
Per_Åke_MattiasWallin
New Contributor III

Mark,

That should work (I'm using 1.7.1) and only the title is required.  Can it be something with the data you are trying to publish?

Reply
0 Kudos
JillRKelly
New Contributor II

I have the same problem -- did you solve it?  Somewhere in the big error message above the type error, it says,

"Cannot Export the data without ArcPy or PyShp modules."

But even adding PyShp (Mac) and importing shapefile from it doesn't help.

Tags (1)
Reply
0 Kudos