René's URL Explorer Experiment


Title: google.cloud.error_reporting AttributeError: 'Client' object has no attribute 'project' · Issue #3167 · googleapis/google-cloud-python · GitHub

Open Graph Title: google.cloud.error_reporting AttributeError: 'Client' object has no attribute 'project' · Issue #3167 · googleapis/google-cloud-python

X Title: google.cloud.error_reporting AttributeError: 'Client' object has no attribute 'project' · Issue #3167 · googleapis/google-cloud-python

Description: I am trying to follow the sample code here in an appengine custom flexible runtime and whenever I run the code, I get the following error: Traceback (most recent call last): File "/env/lib/python3.5/site-packages/flask/app.py", line 1994...

Open Graph Description: I am trying to follow the sample code here in an appengine custom flexible runtime and whenever I run the code, I get the following error: Traceback (most recent call last): File "/env/lib/python3....

X Description: I am trying to follow the sample code here in an appengine custom flexible runtime and whenever I run the code, I get the following error: Traceback (most recent call last): File "/env/lib/pyt...

Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/3167

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"google.cloud.error_reporting AttributeError: 'Client' object has no attribute 'project'","articleBody":"I am trying to follow the sample code [here](https://googlecloudplatform.github.io/google-cloud-python/stable/error-reporting-usage.html) in an appengine custom flexible runtime and whenever I run the code, I get the following error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1994, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1985, in wsgi_app\r\n    response = self.handle_exception(e)\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1540, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/env/lib/python3.5/site-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1982, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1614, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1517, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/env/lib/python3.5/site-packages/flask/_compat.py\", line 33, in reraise\r\n    raise value\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1612, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/env/lib/python3.5/site-packages/flask/app.py\", line 1598, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/home/vmagent/app/xxx.py\", line 20, in simulate_error\r\n    ec.report_exception()\r\n  File \"/env/lib/python3.5/site-packages/google/cloud/error_reporting/client.py\", line 348, in report_exception\r\n    user=user)\r\n  File \"/env/lib/python3.5/site-packages/google/cloud/error_reporting/client.py\", line 277, in _send_error_report\r\n    self.report_errors_api.report_error_event(error_report)\r\n  File \"/env/lib/python3.5/site-packages/google/cloud/error_reporting/client.py\", line 162, in report_errors_api\r\n    self._report_errors_api = make_report_error_api(self)\r\n  File \"/env/lib/python3.5/site-packages/google/cloud/error_reporting/_gax.py\", line 44, in make_report_error_api\r\n    return _ErrorReportingGaxApi(gax_client, client.project)\r\nAttributeError: 'Client' object has no attribute 'project'\r\n```\r\nIn the same project I'm also creating clients for pubsub and storage with the same default constructor and they both find the project and credentials, both when running in appengine as well as when I run the container locally and specify credentials by setting GOOGLE_APPLICATION_CREDENTIALS to point to a json file containing credentials for a service account.\r\n\r\nI have also tried explicitly passing the project explicitly using something like:\r\n\r\n```\r\nec = error_reporting.Client(project='xyz')\r\n```\r\n\r\nand\r\n\r\n```\r\nec = error_reporting.Client('xyz')\r\n```\r\n\r\nto no avail.\r\n\r\nHere is the sample code that fails:\r\n\r\n```\r\nfrom flask import Flask\r\nfrom google.cloud import error_reporting\r\n\r\n\r\napp = Flask(__name__)\r\n\r\n\r\n@app.route('/simulate_error')\r\ndef simulate_error():\r\n    ec = error_reporting.Client()\r\n    try:\r\n        # simulate calling a method that's not defined\r\n        raise NameError\r\n    except Exception:\r\n        ec.report_exception()\r\n\r\n\r\nif __name__ == '__main__':\r\n    app.run(host='0.0.0.0', debug=True)\r\n```\r\n\r\nHere is the output from `pip freeze | grep ^google-cloud`:\r\n\r\n```\r\ngoogle-cloud==0.23.0\r\ngoogle-cloud-bigquery==0.23.0\r\ngoogle-cloud-bigtable==0.23.1\r\ngoogle-cloud-core==0.23.1\r\ngoogle-cloud-datastore==0.23.0\r\ngoogle-cloud-dns==0.23.0\r\ngoogle-cloud-error-reporting==0.23.1\r\ngoogle-cloud-language==0.23.1\r\ngoogle-cloud-logging==0.23.1\r\ngoogle-cloud-monitoring==0.23.0\r\ngoogle-cloud-pubsub==0.23.0\r\ngoogle-cloud-resource-manager==0.23.0\r\ngoogle-cloud-runtimeconfig==0.23.0\r\ngoogle-cloud-spanner==0.23.1\r\ngoogle-cloud-speech==0.23.0\r\ngoogle-cloud-storage==0.23.1\r\ngoogle-cloud-translate==0.23.0\r\ngoogle-cloud-vision==0.23.3\r\n```","author":{"url":"https://github.com/cva","@type":"Person","name":"cva"},"datePublished":"2017-03-19T00:24:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/3167/google-cloud-python/issues/3167"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4d343b5f-a3d1-7ef3-741a-a88111b8f902
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEE04:DCF9D:1806FE:209053:6A4D8546
html-safe-noncef23ff6ca6a146ab2e239723192189979d59a8ce671bd7e0294fa04ce0c7a0389
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRTA0OkRDRjlEOjE4MDZGRToyMDkwNTM6NkE0RDg1NDYiLCJ2aXNpdG9yX2lkIjoiMjAxOTk0OTQwMTk5NzE0OTUxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac78291576c36e72869054f669d4972130fc11c4a00c1b5a2f490f5bfd128f891d
hovercard-subject-tagissue:215231545
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/3167/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1d9b6dc07c57db3adf7e2d350545028068bc1710a66b700f34f673b4ce008c95/googleapis/google-cloud-python/issues/3167
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1d9b6dc07c57db3adf7e2d350545028068bc1710a66b700f34f673b4ce008c95/googleapis/google-cloud-python/issues/3167
og:image:altI am trying to follow the sample code here in an appengine custom flexible runtime and whenever I run the code, I get the following error: Traceback (most recent call last): File "/env/lib/python3....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecva
hostnamegithub.com
expected-hostnamegithub.com
Nonec6bf61c909482ec3072ef5d7a5a28f2a9d214788c9a44793eca1960048cb05ae
turbo-cache-controlno-preview
go-importgithub.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id16316451
octolytics-dimension-repository_nwogoogleapis/google-cloud-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id16316451
octolytics-dimension-repository_network_root_nwogoogleapis/google-cloud-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6702a58b419a792226bd21ef0fb1bcb318bbcaa3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/google-cloud-python/issues/3167#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F3167
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-python%2Fissues%2F3167
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fgoogle-cloud-python
Reloadhttps://github.com/googleapis/google-cloud-python/issues/3167
Reloadhttps://github.com/googleapis/google-cloud-python/issues/3167
Reloadhttps://github.com/googleapis/google-cloud-python/issues/3167
Please reload this pagehttps://github.com/googleapis/google-cloud-python/issues/3167
googleapis https://github.com/googleapis
google-cloud-pythonhttps://github.com/googleapis/google-cloud-python
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-python
Fork 1.7k https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-python
Star 5.3k https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-python
Code https://github.com/googleapis/google-cloud-python
Issues 439 https://github.com/googleapis/google-cloud-python/issues
Pull requests 129 https://github.com/googleapis/google-cloud-python/pulls
Discussions https://github.com/googleapis/google-cloud-python/discussions
Actions https://github.com/googleapis/google-cloud-python/actions
Projects https://github.com/googleapis/google-cloud-python/projects
Security and quality 0 https://github.com/googleapis/google-cloud-python/security
Insights https://github.com/googleapis/google-cloud-python/pulse
Code https://github.com/googleapis/google-cloud-python
Issues https://github.com/googleapis/google-cloud-python/issues
Pull requests https://github.com/googleapis/google-cloud-python/pulls
Discussions https://github.com/googleapis/google-cloud-python/discussions
Actions https://github.com/googleapis/google-cloud-python/actions
Projects https://github.com/googleapis/google-cloud-python/projects
Security and quality https://github.com/googleapis/google-cloud-python/security
Insights https://github.com/googleapis/google-cloud-python/pulse
google.cloud.error_reporting AttributeError: 'Client' object has no attribute 'project'https://github.com/googleapis/google-cloud-python/issues/3167#top
https://github.com/lukesneeringer
api: clouderrorreportingIssues related to the Error Reporting API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20clouderrorreporting%22
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p1%22
https://github.com/cva
cvahttps://github.com/cva
on Mar 19, 2017https://github.com/googleapis/google-cloud-python/issues/3167#issue-215231545
herehttps://googlecloudplatform.github.io/google-cloud-python/stable/error-reporting-usage.html
lukesneeringerhttps://github.com/lukesneeringer
api: clouderrorreportingIssues related to the Error Reporting API.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22api%3A%20clouderrorreporting%22
priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.https://github.com/googleapis/google-cloud-python/issues?q=state%3Aopen%20label%3A%22priority%3A%20p1%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.