deepdoctection icon indicating copy to clipboard operation
deepdoctection copied to clipboard

[Error] Can't load tokenizer form layoutlm

Open yumikim381 opened this issue 10 months ago • 1 comments

Bug 💥 I m getting this issue when i try to load the analyzer

Traceback (most recent call last): File "testing.py", line 133, in analyzer = dd.get_dd_analyzer() File "/myhome/deepdoctection/deepdoctection/utils/file_utils.py", line 704, in getattr module = self._get_module(self._class_to_module[name]) File "/myhome/deepdoctection/deepdoctection/utils/file_utils.py", line 714, in _get_module return importlib.import_module("." + module_name, self.name) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/myhome/deepdoctection/deepdoctection/analyzer/init.py", line 22, in from .dd import * File "/myhome/deepdoctection/deepdoctection/analyzer/dd.py", line 38, in from ..pipe.base import PipelineComponent File "/myhome/deepdoctection/deepdoctection/pipe/init.py", line 31, in from .lm import * File "/myhome/deepdoctection/deepdoctection/pipe/lm.py", line 39, in ("LayoutLMForTokenClassification", False): LayoutLMTokenizerFast.from_pretrained( File "/usr/local/lib/python3.8/dist-packages/transformers/tokenization_utils_base.py", line 2070, in from_pretrained raise EnvironmentError( OSError: Can't load tokenizer for 'microsoft/layoutlm-base-uncased'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'microsoft/layoutlm-base-uncased' is the correct path to a directory containing all relevant files for a LayoutLMTokenizerFast tokenizer.

Expected behavior 🧮 Describe what you would have expected

Screenshots 🖼 If possible, please add a screenshot of the error message, if possible

Desktop (please complete the following information, if any other than the one in the install requirements):

  • OS: [e.g. iOS]

Additional context 🧬 If necessary add some context related to the problem

yumikim381 avatar Apr 22 '24 13:04 yumikim381

I think, you are running on an older version. The issue results from the fact that it tries to download some tokenizer information (which has nothing to do for running the analyzer) and fails because the Huggingface hub was down until a few minutes ago.

Try to install the most recent version (i.e. v.0.31.0) or re-run the code once the Huggingface hub is up again.

JaMe76 avatar Apr 22 '24 14:04 JaMe76

Stale issue message

github-actions[bot] avatar Jun 22 '24 13:06 github-actions[bot]