Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ▌ OS Control enabled
- > open notepad and write "hello"
- Let's start by trying to open Notepad and write "hello".
- Here's the first step:
- computer.display.view()
- Output truncated. Showing the last 2800 characters.
- 'input_filename': input_filename,
- 280 'output_filename_base': temp_name,
- (...)
- 285 'timeout': timeout,
- 286 }
- --> 288 run_tesseract(**kwargs)
- 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
- File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
- lang, config, nice, timeout)
- 259 else:
- --> 260 raise TesseractNotFoundError()
- 262 with timeout_manager(proc, timeout) as error_string:
- TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- During handling of the above exception, another exception occurred:
- Exception Traceback (most recent call last)
- Cell In[8], line 2
- 1 print('##active_line1##')
- ----> 2 computer.display.view()
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
- 59 def view(self, show=True, quadrant=None):
- 60 """
- 61 Redirects to self.screenshot
- 62 """
- ---> 63 return self.screenshot(show, quadrant)
- computer.display.view()
- Output truncated. Showing the last 2800 characters.
- 'input_filename': input_filename,
- 280 'output_filename_base': temp_name,
- (...)
- 285 'timeout': timeout,
- 286 }
- --> 288 run_tesseract(**kwargs)
- 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
- File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
- lang, config, nice, timeout)
- 259 else:
- --> 260 raise TesseractNotFoundError()
- 262 with timeout_manager(proc, timeout) as error_string:
- TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- During handling of the above exception, another exception occurred:
- Exception Traceback (most recent call last)
- Cell In[8], line 2
- 1 print('##active_line1##')
- ----> 2 computer.display.view()
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
- 59 def view(self, show=True, quadrant=None):
- 60 """
- 61 Redirects to self.screenshot
- 62 """
- ---> 63 return self.screenshot(show, quadrant)
- computer.display.view()
- Output truncated. Showing the last 2800 characters.
- 'input_filename': input_filename,
- 280 'output_filename_base': temp_name,
- (...)
- 285 'timeout': timeout,
- 286 }
- --> 288 run_tesseract(**kwargs)
- 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
- File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
- lang, config, nice, timeout)
- 259 else:
- --> 260 raise TesseractNotFoundError()
- 262 with timeout_manager(proc, timeout) as error_string:
- TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- During handling of the above exception, another exception occurred:
- Exception Traceback (most recent call last)
- Cell In[8], line 2
- 1 print('##active_line1##')
- ----> 2 computer.display.view()
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
- 59 def view(self, show=True, quadrant=None):
- 60 """
- 61 Redirects to self.screenshot
- 62 """
- ---> 63 return self.screenshot(show, quadrant)
- computer.display.view()
- Output truncated. Showing the last 2800 characters.
- 'input_filename': input_filename,
- 280 'output_filename_base': temp_name,
- (...)
- 285 'timeout': timeout,
- 286 }
- --> 288 run_tesseract(**kwargs)
- 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
- File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
- lang, config, nice, timeout)
- 259 else:
- --> 260 raise TesseractNotFoundError()
- 262 with timeout_manager(proc, timeout) as error_string:
- TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- During handling of the above exception, another exception occurred:
- Exception Traceback (most recent call last)
- Cell In[8], line 2
- 1 print('##active_line1##')
- ----> 2 computer.display.view()
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
- 59 def view(self, show=True, quadrant=None):
- 60 """
- 61 Redirects to self.screenshot
- 62 """
- ---> 63 return self.screenshot(show, quadrant)
- computer.display.view()
- Output truncated. Showing the last 2800 characters.
- 'input_filename': input_filename,
- 280 'output_filename_base': temp_name,
- (...)
- 285 'timeout': timeout,
- 286 }
- --> 288 run_tesseract(**kwargs)
- 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
- File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
- lang, config, nice, timeout)
- 259 else:
- --> 260 raise TesseractNotFoundError()
- 262 with timeout_manager(proc, timeout) as error_string:
- TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- During handling of the above exception, another exception occurred:
- Exception Traceback (most recent call last)
- Cell In[8], line 2
- 1 print('##active_line1##')
- ----> 2 computer.display.view()
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
- 59 def view(self, show=True, quadrant=None):
- 60 """
- 61 Redirects to self.screenshot
- 62 """
- ---> 63 return self.screenshot(show, quadrant)
- computer.display.view()
- Output truncated. Showing the last 2800 characters.
- 'input_filename': input_filename,
- 280 'output_filename_base': temp_name,
- (...)
- 285 'timeout': timeout,
- 286 }
- --> 288 run_tesseract(**kwargs)
- 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
- File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
- lang, config, nice, timeout)
- 259 else:
- --> 260 raise TesseractNotFoundError()
- 262 with timeout_manager(proc, timeout) as error_string:
- TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
- During handling of the above exception, another exception occurred:
- Exception Traceback (most recent call last)
- Cell In[8], line 2
- 1 print('##active_line1##')
- ----> 2 computer.display.view()
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
- 59 def view(self, show=True, quadrant=None):
- 60 """
- 61 Redirects to self.screenshot
- 62 """
- ---> 63 return self.screenshot(show, quadrant)
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:75, in Display.screenshot(self, show, quadrant,
- active_app_only, force_image)
- 71 """
- 72 Shows you what's on the screen by taking a screenshot of the entire screen or a specified quadrant. Returns a `pil_image` `in case
- you need it (rarely). **You almost always want to do this first!**
- 73 """
- 74 if not self.computer.emit_images and force_image == False:
- ---> 75 text = self.get_text_as_list_of_lists()
- 76 pp = pprint.PrettyPrinter(indent=4)
- 77 pretty_text = pp.pformat(text) # language models like it pretty!
- File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:258, in Display.get_text_as_list_of_lists(self,
- screenshot)
- 256 return pytesseract_get_text(screenshot)
- 257 except:
- --> 258 raise Exception(
- 259 "Failed to find text locally.\n\nTo find text in order to use the mouse, please make sure you've installed `pytesseract`
- along with the Tesseract executable (see this Stack Overflow answer for help installing Tesseract:
- https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i)."
- 260 )
- Exception: Failed to find text locally.
- To find text in order to use the mouse, please make sure you've installed `pytesseract` along with the Tesseract executable (see this Stack
- Overflow answer for help installing Tesseract:
- https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i).
- First, let's install pytesseract and Tesseract. We can try:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement