You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On initializing the gcv_agent, the following error occurs: AttributeError: module 'google.cloud.vision' has no attribute 'types'
This error is thrown at line 119 of layoutparser/ocr/gcv_agent.py: self._context = _vision.types.ImageContext(language_hints=languages)
Editing line 119 to this fixes it: self._context = _vision.ImageContext(language_hints=languages)
The same goes for line 134: img_content = _vision.types.Image(content=img_content)
which runs correctly when modified to: img_content = _vision.Image(content=img_content)
Describe the bug
On initializing the gcv_agent, the following error occurs:
AttributeError: module 'google.cloud.vision' has no attribute 'types'
This error is thrown at line 119 of layoutparser/ocr/gcv_agent.py:
self._context = _vision.types.ImageContext(language_hints=languages)
Editing line 119 to this fixes it:
self._context = _vision.ImageContext(language_hints=languages)
The same goes for line 134:
img_content = _vision.types.Image(content=img_content)
which runs correctly when modified to:
img_content = _vision.Image(content=img_content)
To Reproduce
ocr_agent
is initializedEnvironment
Platform is MacOS with LayoutParser 0.3.4
The text was updated successfully, but these errors were encountered: