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

Error while testing #3

Open
pranavrajt opened this issue Feb 26, 2019 · 2 comments
Open

Error while testing #3

pranavrajt opened this issue Feb 26, 2019 · 2 comments

Comments

@pranavrajt
Copy link

Hey, I am new to OCR and was trying I was just trying to this locally using the commands you had provided. I am getting the following error.

[2019-02-26 15:41:04,244] INFO : Downloading image from url: https://marketplace.canva.com/MACHUlPU93Q/1/0/thumbnail_large/canva-peach-green-leaves-garden-vegeta
[2019-02-26 15:41:04,395] INFO : Saving file: /var/folders/wd/p0271j0x695_t5m5h0zr0dd00000gp/T/tmpzj06kyq7
[2019-02-26 15:41:04,395] INFO : Processing image for text Extraction
[2019-02-26 15:41:04,527] INFO : Removing noise and smoothening image
Traceback (most recent call last):
File "read_image.py", line 135, in
cli()
File "/anaconda3/lib/python3.6/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/anaconda3/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/anaconda3/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/anaconda3/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "read_image.py", line 127, in read_text_from_image_url
return read_image_from_file(filename)
File "read_image.py", line 92, in read_image_from_file
image_text = extract_image_text(image)
File "read_image.py", line 36, in extract_image_text
contours = find_possible_contours_in_image(inv_img)
File "read_image.py", line 85, in find_possible_contours_in_image
dilated, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) # get contours
ValueError: not enough values to unpack (expected 3, got 2)

Can you tell me where i am going wrong with this

@yardstick17
Copy link
Owner

yardstick17 commented Apr 3, 2019

@pranavrajt Can you try again, maybe it was because the opencv version was not pinned. I would suggest to install the requirements again and try the command to see if this works for you.

Commit to fix the issue: 6c0199f

@Salinatorimperator
Copy link

Same issue here, after pip install -r requirements.txt works.

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

No branches or pull requests

3 participants