<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: My AGOL Notebooks are not working in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1160280#M7269</link>
    <description>&lt;P&gt;I think this issue has been fixed. A week ago I used `to_featurelayer()` and it workerd perfectly fine but this week is not working at all &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Apr 2022 14:48:16 GMT</pubDate>
    <dc:creator>MVAC</dc:creator>
    <dc:date>2022-04-01T14:48:16Z</dc:date>
    <item>
      <title>My AGOL Notebooks are not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1159406#M7265</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;This week I've been having issues with the notebooks I've been using for the past two months. Some parts work others doesnt and I cant find the problem.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# set our spatial reference
print('Setting spatial reference...')
sr = 32633

# query features to dataframe
print('Querying features to dataframe...')
df = parcels.query(
    as_df = True,
    return_centroid = True,
    return_geometry = False,
    out_sr = sr
)

# convert centroid to dict
print('Converting centroid to dictionary...')
sdf = GeoAccessor.from_xy(df.join(pd.DataFrame(df.loc[:, 'centroid'].to_dict()).T), 'x', 'y', sr=sr)

# drop the centroid columns
sdf.drop(columns=['x', 'y', 'centroid', 'OBJECTID'], inplace=True)
print('Spatial DataFrame succesfully created')
#sdf.head()


# export to new feature class
sdf.spatial.to_featurelayer(
    title = 'Points_parcels',
    gis = gis,
    tags = ['parcels', 'centroids'],
    folder = 'Layers',
    sanitize_columns = True,
    service_name = 'parcels'
)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_44/3260207136.py in &amp;lt;module&amp;gt;
      6     folder = 'Layers',
      7     sanitize_columns = True,
----&amp;gt; 8     service_name = 'parcels'
      9 )

TypeError: to_featurelayer() got an unexpected keyword argument 'sanitize_columns'
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another notebook I use to create workforce projects its returning an error as well:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# create a new workforce project
project = arcgis.apps.workforce.create_project(name_project, summary='This project was created by Python')

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_64/338207951.py in &amp;lt;module&amp;gt;
----&amp;gt; 1 project = arcgis.apps.workforce.create_project(name_project, summary='This project was created by Python')

/opt/conda/lib/python3.7/site-packages/arcgis/apps/workforce/_store/projects.py in create_project(title, summary, major_version, gis)
     65                 "Offline Workforce Projects not supported at GIS lower than 7.1"
     66             )
---&amp;gt; 67         return _v2_create_project(gis, summary, title)
     68 
     69     else:

/opt/conda/lib/python3.7/site-packages/arcgis/apps/workforce/_store/projects.py in _v2_create_project(gis, summary, title)
    176 def _v2_create_project(gis, summary, title):
    177     """Creates project following version 2 Workforce schema"""
--&amp;gt; 178     for f in gis.users.me.folders:
    179         if f["title"].lower() == title.lower():
    180             raise WorkforceError("A folder named '{}' already exists.".format(title))

AttributeError: 'NoneType' object has no attribute 'folders'
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:31:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1159406#M7265</guid>
      <dc:creator>MVAC</dc:creator>
      <dc:date>2022-03-30T14:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: My AGOL Notebooks are not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1159425#M7266</link>
      <description>&lt;P&gt;did you upgrade arcgis?&lt;/P&gt;&lt;P&gt;There is at least one issue with sanitize_columns vs sanitize_column_names on their github site&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-python-api/issues/923" target="_blank"&gt;sedf.spatial.to_featureclass(sanitize_columns=True) always mutates the calling SEDF · Issue #923 · Esri/arcgis-python-api (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 15:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1159425#M7266</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-03-30T15:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: My AGOL Notebooks are not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1160280#M7269</link>
      <description>&lt;P&gt;I think this issue has been fixed. A week ago I used `to_featurelayer()` and it workerd perfectly fine but this week is not working at all &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 14:48:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1160280#M7269</guid>
      <dc:creator>MVAC</dc:creator>
      <dc:date>2022-04-01T14:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: My AGOL Notebooks are not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1164596#M7316</link>
      <description>&lt;P&gt;I'm running into a similar issue but with the service_name parameter. Haven't figured it out yet. Following the documentation here: &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=to_featurelayer#arcgis.features.GeoAccessor.to_featurelayer" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=to_featurelayer#arcgis.features.GeoAccessor.to_featurelayer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sdf.spatial.to_featurelayer(title='My Feature Layer Title', tags=['my','tags'], service_name='My_Feature_Layer_Title')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;TypeError&lt;/SPAN&gt;: to_featurelayer() got an unexpected keyword argument 'service_name'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works if I remove the service_name argument, but then the name of my service is a randomly generated string. Not sure how else to define it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe because I'm using a Spatially Enabled Dataframe instead of the deprecated Spatial Dataframe?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 21:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/my-agol-notebooks-are-not-working/m-p/1164596#M7316</guid>
      <dc:creator>AaronKoelker</dc:creator>
      <dc:date>2022-04-14T21:05:21Z</dc:date>
    </item>
  </channel>
</rss>

