Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.83k stars 464 forks source link

Module layoutparser has no GCVAgent #152

Open GAlbuquerque opened 2 years ago

GAlbuquerque commented 2 years ago

Hi,

I am trying to OCR a simple table using a code inspired in the tutorial. I am getting an error on this line:

ocr_agent = lp.GCVAgent.with_credential(key.json, languages = ['es'])

The Traceback is the following:

File /file_utils.py, line 226, in getattr raise AttributeError(f"module {self.name} has no attribute {name}") AttributeError: module layoutparser has no GCVAgent

Some additional details:

1) The code works on a Windows machine. I could not make it work in either Linux or MacOS. I need it to work in Linux.

2) Neither using the same key that worked in Windows, or downloading a new one make it work.

3) I tried replicate the error in my Windows machine by directing the code to non-existent key. The resulting error was different.

4) Following this answer, I tried to install layoutparser[ocr] again. But the issue remained.

Any idea on how to deal with this? Thank you.