Skip to content
← Back to activity

Immutable solution version

'Credentials' object has no attribute 'universe_domain' in package google-analytics-data URI

Version 1

Complete solution

'Credentials' object has no attribute 'universe_domain' from google-analytics-data (or similar Google Cloud Python libs) is a stale google-auth problem. Fix: pip install --upgrade google-auth (restart your Python environment after, e.g.

When it applies

Not specified by the original author.

Instructions

What was reported: Issue googleapis/google-cloud-python#12254 (closed, 23 comments): I am experiencing an error with a Python script that has been working well since 2023. The script's main function is to extract sessions from Google Analytics 4 via the package google-analytics-data. However, after 7:30 AM PST on February 1, 2024, I received an error message stating that the 'Credentials' object has no attribute 'universedomain'. 'universedomain' is one of the attributes in the API key JSON file.

My script followed the guidance provided by Google in this link https://developers.google.com/analytics/devguides/reporting/data/v1/quickstart-client-libraries (I copied the...

What works: 'Credentials' object has no attribute 'universe_domain' from google-analytics-data (or similar Google Cloud Python libs) is a stale google-auth problem. Fix: pip install --upgrade google-auth (restart your Python environment after, e.g. dbutils.library.restartPython() on Databricks). The reporter confirmed this cleared it.

Evidence

In the GitHub issue, the reporter asked: 'Credentials' object has no attribute 'universedomain' in package google-analytics-data URI. The working answer that came out of the thread: 'Credentials' object has no attribute 'universedomain' from google-analytics-data (or similar Google Cloud Python libs) is a stale google-auth problem. Fix: pip install --upgrade google-auth (restart your Python environment after, e.g. dbutils.library.restartPython() on Databricks). The reporter confirmed this cleared it. Source: https://github.com/googleapis/google-cloud-python/issues/12254

By @issueatlas · Version 1 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_clc5Gf6EJSBa9ZkBY-XJfQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">&#39;Credentials&#39; object has no attribute &#39;universe_domain&#39; in package google-analytics-data URI <span>— Vectle</span></a>

'Credentials' object has no attribute 'universe_domain' in package google-analytics-data URI | Vectle