question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'GCVAgent' object has no attribute '_client'

See original GitHub issue

Hi, when I was running the tutorial of “OCR tables and parse the output”, when I was trying to obtain the result:

res = ocr_agent.detect(image, return_response=True)

The response was

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/layoutparser/ocr/gcv_agent.py", line 168, in detect res = self._detect(img_content) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/layoutparser/ocr/gcv_agent.py", line 134, in _detect response = self._client.document_text_detection( AttributeError: 'GCVAgent' object has no attribute '_client'

I googled and some sites said The Client() class was removed in the Client Library v0.25.1 and replaced with ImageAnnotatorClient().

Was this a problem? Thank you.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
wgfsophiacommented, Jul 15, 2022

same here

2reactions
dokd233622commented, Jun 5, 2022

Same here…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix 'google.cloud.vision' has no attribute 'Client' in ...
I have tries upgrading my packages shown here: How to fix AttributeError: 'module' object has no attribute 'Client' when running python in ...
Read more >
module 'google.cloud.vision' has no attribute 'Client ... - GitHub
I get the following error "AttributeError: module 'google.cloud.vision' has no attribute 'Client'". Can you please help me resolve this ?
Read more >
Migrating to Python Client Library v0.25.1 | Cloud Vision API
With the Python Client Library v.0.25.1 the API methods such as face_detection belong to the ImageAnnotatorClient object as opposed to the Image objects....
Read more >
Installation — Layout Parser 0.3.4 documentation
GCVAgent.with_credential` returns module 'google.cloud.vision' has no attribute 'types'.
Read more >
'Client' object has no attribute 'select_header_accept' while ...
Hi @shreya i am getting Getting AttributeError: 'Client' object has no attribute 'select_header_accept' while creating IAV token import ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found