Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib.error.HTTPError: HTTP Error 404: Not Found #43

Open
Ace-bb opened this issue Jul 10, 2023 · 0 comments
Open

urllib.error.HTTPError: HTTP Error 404: Not Found #43

Ace-bb opened this issue Jul 10, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@Ace-bb
Copy link

Ace-bb commented Jul 10, 2023

Exception in Tkinter callback Traceback (most recent call last): File "D:\Programs\Anaconda\envs\flowchart\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args) File "handler.py", line 417, in <lambda> ],window File "handler.py", line 533, in predict self.tc = TextClassifier() File "E:\Projects\flowchart\handwritten-flowchart-with-cnn\text_model\text_classifier.py", line 43, in __init__ self.recognizer = keras_ocr.recognition.Recognizer(alphabet = alphabet_detection) File "D:\Programs\Anaconda\envs\flowchart\lib\site-packages\keras_ocr\recognition.py", line 329, in __init__ sha256=weights_dict['weights']['top']['sha256'])) File "D:\Programs\Anaconda\envs\flowchart\lib\site-packages\keras_ocr\tools.py", line 453, in download_and_verify urllib.request.urlretrieve(url, filepath) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 248, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 223, in urlopen return opener.open(url, data, timeout) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 532, in open response = meth(req, response) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 564, in error result = self._call_chain(*args) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 504, in _call_chain result = func(*args) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 756, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 532, in open response = meth(req, response) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 570, in error return self._call_chain(*args) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 504, in _call_chain result = func(*args) File "D:\Programs\Anaconda\envs\flowchart\lib\urllib\request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

You should replace this code in keras_ocr\recognition.py.

PRETRAINED_WEIGHTS = {
    'kurapan': {
        'alphabet': DEFAULT_ALPHABET,
        'build_params': DEFAULT_BUILD_PARAMS,
        'weights': {
            # 'notop': {
            #     'url': 'https://www.mediafire.com/file/n9yfn5wueu82rgf/crnn_kurapan_notop.h5/file',
            #     'filename': 'crnn_kurapan_notop.h5',
            #     'sha256': '027fd2cced3cbea0c4f5894bb8e9e85bac04f11daf96b8fdcf1e4ee95dcf51b9'
            # },
            # 'top': {
            #     'url': 'https://www.mediafire.com/file/pkj2p29b1f6fpil/crnn_kurapan.h5/file',
            #     'filename': 'crnn_kurapan.h5',
            #     'sha256': 'a7d8086ac8f5c3d6a0a828f7d6fbabcaf815415dd125c32533013f85603be46d'
            # }
            "notop": {
                "url": "https://github.com/faustomorales/keras-ocr/releases/download/v0.8.4/crnn_kurapan_notop.h5",
                "filename": "crnn_kurapan_notop.h5",
                "sha256": "027fd2cced3cbea0c4f5894bb8e9e85bac04f11daf96b8fdcf1e4ee95dcf51b9",
            },
            "top": {
                "url": "https://github.com/faustomorales/keras-ocr/releases/download/v0.8.4/crnn_kurapan.h5",
                "filename": "crnn_kurapan.h5",
                "sha256": "a7d8086ac8f5c3d6a0a828f7d6fbabcaf815415dd125c32533013f85603be46d",
            }
        }
    }
}
@dbetm dbetm added the good first issue Good for newcomers label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants