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

cli fix - rotation_info type cast error #1188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pawelrojek
Copy link

Rotation angles were treated as strings.

Caused this type cast error:

Traceback (most recent call last):
  File "python3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "python3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "Python3\Scripts\easyocr.exe\__main__.py", line 7, in <module>
  File "python3\lib\site-packages\easyocr\cli.py", line 253, in main
    for line in reader.readtext(args.file,\
  File "python3\lib\site-packages\easyocr\easyocr.py", line 468, in readtext
    result = self.recognize(img_cv_grey, horizontal_list, free_list,\
  File "python3\lib\site-packages\easyocr\easyocr.py", line 401, in recognize
    image_list = make_rotated_img_list(rotation_info, image_list)
  File "python3\lib\site-packages\easyocr\utils.py", line 814, in make_rotated_img_list
    rotated = ndimage.rotate(img_info[1], angle, reshape=True)
  File "python3\lib\site-packages\scipy\ndimage\_interpolation.py", line 913, in rotate
    c, s = special.cosdg(angle), special.sindg(angle)
TypeError: ufunc 'cosdg' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

@jonashaag
Copy link

Does not strip []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants