<?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 AGOL User object 'report' method/function errors in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189174#M7538</link>
    <description>&lt;P&gt;According to the API docs for User object there is a 'report' function.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.User" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.User&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I attempt to get a report for a user as shown below...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
import datetime as _dt

## connect to portal
agol = GIS("home")

## logged in user - returns a User object
user = agol.users.me

## https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.User
seven_days_ago = _dt.datetime.now(_dt.timezone.utc) - _dt.timedelta(days=7)
item = user.report("content", seven_days_ago, duration="weekly")

print(item)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I get the following error...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "C:\ArcGISPro\envs\arcgispro-py3-nbi\lib\site-packages\arcgis\gis\__init__.py", line 7272, in __getattr__
    return dict.__getitem__(self, name)
KeyError: 'report'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "&amp;lt;module2&amp;gt;", line 12, in &amp;lt;module&amp;gt;
  File "C:\ArcGISPro\envs\arcgispro-py3-nbi\lib\site-packages\arcgis\gis\__init__.py", line 7274, in __getattr__
    raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, name))
AttributeError: 'User' object has no attribute 'report'&lt;/LI-CODE&gt;&lt;P&gt;Has anyone successfully ran a user report using this method?&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jul 2022 14:36:11 GMT</pubDate>
    <dc:creator>Clubdebambos</dc:creator>
    <dc:date>2022-07-04T14:36:11Z</dc:date>
    <item>
      <title>AGOL User object 'report' method/function errors</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189174#M7538</link>
      <description>&lt;P&gt;According to the API docs for User object there is a 'report' function.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.User" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.User&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I attempt to get a report for a user as shown below...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
import datetime as _dt

## connect to portal
agol = GIS("home")

## logged in user - returns a User object
user = agol.users.me

## https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.User
seven_days_ago = _dt.datetime.now(_dt.timezone.utc) - _dt.timedelta(days=7)
item = user.report("content", seven_days_ago, duration="weekly")

print(item)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I get the following error...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Traceback (most recent call last):
  File "C:\ArcGISPro\envs\arcgispro-py3-nbi\lib\site-packages\arcgis\gis\__init__.py", line 7272, in __getattr__
    return dict.__getitem__(self, name)
KeyError: 'report'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "&amp;lt;module2&amp;gt;", line 12, in &amp;lt;module&amp;gt;
  File "C:\ArcGISPro\envs\arcgispro-py3-nbi\lib\site-packages\arcgis\gis\__init__.py", line 7274, in __getattr__
    raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, name))
AttributeError: 'User' object has no attribute 'report'&lt;/LI-CODE&gt;&lt;P&gt;Has anyone successfully ran a user report using this method?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 14:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189174#M7538</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2022-07-04T14:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL User object 'report' method/function errors</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189313#M7540</link>
      <description>&lt;P&gt;Hi Clubdebambos,&lt;/P&gt;&lt;P&gt;From ArcGIS Pro Notebook I can run successfully a user report using your method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe check:&lt;/P&gt;&lt;P&gt;- ArcGIS Pro version 3.0&lt;/P&gt;&lt;P&gt;- Create a new python env,&lt;/P&gt;&lt;P&gt;- From Pro are you connected to your AGOL account.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this help you,&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 09:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189313#M7540</guid>
      <dc:creator>FrédéricPRALLY</dc:creator>
      <dc:date>2022-07-05T09:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL User object 'report' method/function errors</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189320#M7541</link>
      <description>&lt;P&gt;Thank&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/3171"&gt;@FrédéricPRALLY&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found that the &lt;FONT face="courier new,courier"&gt;report&lt;/FONT&gt; function was added at 2.0.1. My &lt;FONT face="courier new,courier"&gt;arcgis&lt;/FONT&gt;&amp;nbsp;package version was 1.9.1. Upgrading the version enabled the report function for a &lt;FONT face="courier new,courier"&gt;User&lt;/FONT&gt; object.&lt;/P&gt;&lt;P&gt;For added context, my ArcGIS Pro is version 2.8. I have a cloned python environment that I can update using the Python Package Manager, but there was no &lt;FONT face="courier new,courier"&gt;arcgis&lt;/FONT&gt; package update available here. I used the command prompt with...&lt;/P&gt;&lt;LI-CODE lang="python"&gt;pip install arcgis --upgrade&lt;/LI-CODE&gt;&lt;P&gt;... this upgraded the &lt;FONT face="courier new,courier"&gt;arcgis&lt;/FONT&gt; package to 2.0.1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 10:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189320#M7541</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2022-07-05T10:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: AGOL User object 'report' method/function errors</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189322#M7542</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Perfect ! Thank for your update,&lt;/P&gt;&lt;P&gt;Have a good day,&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 10:06:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/agol-user-object-report-method-function-errors/m-p/1189322#M7542</guid>
      <dc:creator>FrédéricPRALLY</dc:creator>
      <dc:date>2022-07-05T10:06:44Z</dc:date>
    </item>
  </channel>
</rss>

