ModuleNotFoundError: No module named 'easyocr/DBNet'

See original GitHub issue

Hi everyone 😃

First I want to thank you for this great library! Great job! 😃

I wanted to try the new detector DBNet, but I currently get an error:

import easyocr

reader = easyocr.Reader(["en"], detect_network="dbnet18")

witch is producing following Exception:

Traceback (most recent call last):
  File "C:\Users\b30768\PycharmProjects\ocr-service\sandbox.py", line 10, in <module>
    reader = easyocr.Reader(["en"], detect_network="dbnet18")
  File "C:\Users\b30768\PycharmProjects\ocr-service\venv\lib\site-packages\easyocr\easyocr.py", line 210, in __init__
    self.detector = self.initDetector(detector_path)
  File "C:\Users\b30768\PycharmProjects\ocr-service\venv\lib\site-packages\easyocr\easyocr.py", line 272, in initDetector
    return self.get_detector(detector_path, self.device, self.quantize, cudnn_benchmark=self.cudnn_benchmark)
  File "C:\Users\b30768\PycharmProjects\ocr-service\venv\lib\site-packages\easyocr\detection_db.py", line 128, in get_detector
    dbnet.construct_model(dbnet.configs['resnet18']['model'])
  File "C:\Users\b30768\PycharmProjects\ocr-service\venv\lib\site-packages\easyocr\DBNet\DBNet.py", line 168, in construct_model
    self.model = Configurable.construct_class_from_config(config).structure.builder.build(self.device)
  File "C:\Users\b30768\PycharmProjects\ocr-service\venv\lib\site-packages\easyocr\DBNet\model\constructor.py", line 40, in construct_class_from_config
    cls = Configurable.extract_class_from_args(args)
  File "C:\Users\b30768\PycharmProjects\ocr-service\venv\lib\site-packages\easyocr\DBNet\model\constructor.py", line 47, in extract_class_from_args
    module = importlib.import_module(package)
  File "C:\Users\b30768\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'easyocr/DBNet'

I tried several things but I don’t get it work, I thing there is a missing init.py or an import but I don’t get it.

Could someone try to reproduce it ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rkcosmoscommented, Aug 26, 2022

thanks, my team think they have found the cause. Next version will fix this (will be released in a few days).

0reactions
gizmo84commented, Sep 5, 2022

Ok, 1.6.1 is now available on PyPi. ModuleNotFoundError is gone but I get a new error. I will open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'easyocr' · Issue #596
I installed pytorch using this code !pip install torch==1.8.1+cpu torchvision==0.9.1+cpu ... Import easyocr : No module named 'easyocr' #596.
Read more >
easyocr
This model is a new default for Cyrillic script. 24 August 2022 - Version 1.6.0. Restructure code to support alternative text detectors. Add...
Read more >
ModuleNotFoundError: No module named 'easy-ocr'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'easy-ocr' How to remove the ModuleNot.
Read more >
How to install easy OCR - python
the logs for full command output. Not really sure what the error is about. If I install using the second command it simply...
Read more >
ModuleNotFoundError: No module named 'easyocr/DBNet' issue
ModuleNotFoundError : No module named 'easyocr/DBNet' ... I wanted to try the new detector DBNet, but I currently get an error: import easyocr...
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