title: How to fix "'User' object is not subscriptable"
body: <p>I am trying to write some Python code, that gets the users Gitlab Profile picture/avatar to be sent in a Discord Embed later on in the code. However, when i try to read the json that the Gitlab API returns but i receive the error &quot;'User' object is not subscriptable&quot; this json doesnt look like other jsons returned by the Gitlab API.</p>
  <p>I have tried to use Attributes but i still receive the same error, i have also tried just to read it but i still receive the same error.</p>
  <pre class="lang-py prettyprint-override"><code>import gitlab
  import json
  
  # private token or personal token authentication
  gl = gitlab.Gitlab('URL', private_token='')
  
  project = gl.projects.get(13)
  json_data = project.tags.list(order_by='updated', sort='desc')
  newest_tagjson = (json_data[0].attributes)
  latesttag = newest_tagjson[&quot;name&quot;]
  name1 = newest_tagjson[&quot;commit&quot;][&quot;author_name&quot;]
  projectid = newest_tagjson[&quot;project_id&quot;]
  footer1 = &quot;Panel&quot;
  if name1 == &quot;------&quot;:
      ID = 16
  user = gl.users.get(ID)
  print(user)
  user2 = (user['avatar_url'].attributes)
  </code></pre>
  <p>i should receive a clean json that i can read but instead i recieve this in the print</p>
  <pre><code>&lt;class 'gitlab.v4.objects.User'&gt; =&gt; {'id': 16, 'name': '', 'username': '', 'state': 'active', 'avatar_url': 'https://URL.io/uploads/-/system/user/avatar/16/avatar.png', 'web_url': '', 'created_at': '2019-01-29T18:30:53.819Z', 'bio': ' \r\n', 'location': ', United Kingdom', 'public_email': '', 'skype': '', 'linkedin': '', 'twitter': '', 'website_url': '', 'organization': ''}
  </code></pre>
  <p>and i cannot read this.</p>