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

Add local OCR rather than only through the Automagica Portal service #116

Open
pradeep08 opened this issue Apr 3, 2020 · 6 comments · May be fixed by #136
Open

Add local OCR rather than only through the Automagica Portal service #116

pradeep08 opened this issue Apr 3, 2020 · 6 comments · May be fixed by #136
Labels
enhancement New feature or request on hold

Comments

@pradeep08
Copy link

When i try to search a text on the screen using automagica.activities.find_text_on_screen_ocr(testfile), i had encountered, FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\userid\automagica.json'. Later i have created a empty JSON file in the path. Then the following error is being observed
**Traceback (most recent call last):
File "", line 1, in
File "C:\Python37\lib\site-packages\automagica\utilities.py", line 17, in wrapper
return func(*args, **kwargs)
File "C:\Python37\lib\site-packages\automagica\activities.py", line 8489, in find_text_on_screen_ocr
local_data = json.load(json_file)
File "C:\Python37\lib\json_init_.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw)
File "C:\Python37\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\Python37\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python37\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

kathawala pushed a commit to kathawala/automagica that referenced this issue Apr 7, 2020
This affects activitites related to OCR and Vision
which have Automagica APIs that can only be accessed
by users who have signed up online and have API keys
@kathawala
Copy link

You need an API key to do those actions.

I've made a pull request with better error handling to make this more clear ( #119 )

@pradeep08
Copy link
Author

@kathawala How to obtain API Key?

@kathawala
Copy link

You need to sign up on the automagica website, I'm working on a fork to allow ocr activities without API key, but no guarantees on that

@valerietram88
Copy link

You need to sign up on the automagica website, I'm working on a fork to allow ocr activities without API key, but no guarantees on that

Have you finished your work?

@kathawala
Copy link

@valerietram88 Yes, I got some time this evening to revisit it. You can find my branch here: https://github.com/kathawala/automagica/tree/local_ocr

You'll need to install tesseract on your machine to make it work. It's a simple installation. Can work on automating this installation later.

Again, no guarantees, but my next steps would be to test it out on Windows + Mac OS (currently it works on Linux), and then once it works satisfactorily, make a PR here.

@kathawala kathawala linked a pull request Aug 24, 2020 that will close this issue
@koenvaneijk koenvaneijk added the enhancement New feature or request label Sep 7, 2020
@koenvaneijk koenvaneijk changed the title automagica.activities.find_text_on_screen_ocr is not working Add local OCR rather than only through the Automagica Portal service Sep 7, 2020
@koenvaneijk
Copy link
Contributor

This is currently not on our roadmap for Automagica, however we are looking at the possibility of BYOOCR (Bring Your Own OCR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants