Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.80 KB | None | 0 0
  1. ▌ OS Control enabled
  2.  
  3. > open notepad and write "hello"
  4.  
  5. Let's start by trying to open Notepad and write "hello".
  6.  
  7. Here's the first step:
  8.  
  9.  
  10.  
  11. computer.display.view()
  12.  
  13.  
  14. Output truncated. Showing the last 2800 characters.
  15.  
  16. 'input_filename': input_filename,
  17. 280 'output_filename_base': temp_name,
  18. (...)
  19. 285 'timeout': timeout,
  20. 286 }
  21. --> 288 run_tesseract(**kwargs)
  22. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  23.  
  24. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
  25. lang, config, nice, timeout)
  26. 259 else:
  27. --> 260 raise TesseractNotFoundError()
  28. 262 with timeout_manager(proc, timeout) as error_string:
  29.  
  30. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  31.  
  32. During handling of the above exception, another exception occurred:
  33.  
  34. Exception Traceback (most recent call last)
  35. Cell In[8], line 2
  36. 1 print('##active_line1##')
  37. ----> 2 computer.display.view()
  38.  
  39. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  40. 59 def view(self, show=True, quadrant=None):
  41. 60 """
  42. 61 Redirects to self.screenshot
  43. 62 """
  44. ---> 63 return self.screenshot(show, quadrant)
  45.  
  46.  
  47. computer.display.view()
  48.  
  49.  
  50. Output truncated. Showing the last 2800 characters.
  51.  
  52. 'input_filename': input_filename,
  53. 280 'output_filename_base': temp_name,
  54. (...)
  55. 285 'timeout': timeout,
  56. 286 }
  57. --> 288 run_tesseract(**kwargs)
  58. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  59.  
  60. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
  61. lang, config, nice, timeout)
  62. 259 else:
  63. --> 260 raise TesseractNotFoundError()
  64. 262 with timeout_manager(proc, timeout) as error_string:
  65.  
  66. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  67.  
  68. During handling of the above exception, another exception occurred:
  69.  
  70. Exception Traceback (most recent call last)
  71. Cell In[8], line 2
  72. 1 print('##active_line1##')
  73. ----> 2 computer.display.view()
  74.  
  75. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  76. 59 def view(self, show=True, quadrant=None):
  77. 60 """
  78. 61 Redirects to self.screenshot
  79. 62 """
  80. ---> 63 return self.screenshot(show, quadrant)
  81.  
  82.  
  83. computer.display.view()
  84.  
  85.  
  86. Output truncated. Showing the last 2800 characters.
  87.  
  88. 'input_filename': input_filename,
  89. 280 'output_filename_base': temp_name,
  90. (...)
  91. 285 'timeout': timeout,
  92. 286 }
  93. --> 288 run_tesseract(**kwargs)
  94. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  95.  
  96. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
  97. lang, config, nice, timeout)
  98. 259 else:
  99. --> 260 raise TesseractNotFoundError()
  100. 262 with timeout_manager(proc, timeout) as error_string:
  101.  
  102. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  103.  
  104. During handling of the above exception, another exception occurred:
  105.  
  106. Exception Traceback (most recent call last)
  107. Cell In[8], line 2
  108. 1 print('##active_line1##')
  109. ----> 2 computer.display.view()
  110.  
  111. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  112. 59 def view(self, show=True, quadrant=None):
  113. 60 """
  114. 61 Redirects to self.screenshot
  115. 62 """
  116. ---> 63 return self.screenshot(show, quadrant)
  117.  
  118.  
  119. computer.display.view()
  120.  
  121.  
  122. Output truncated. Showing the last 2800 characters.
  123.  
  124. 'input_filename': input_filename,
  125. 280 'output_filename_base': temp_name,
  126. (...)
  127. 285 'timeout': timeout,
  128. 286 }
  129. --> 288 run_tesseract(**kwargs)
  130. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  131.  
  132. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
  133. lang, config, nice, timeout)
  134. 259 else:
  135. --> 260 raise TesseractNotFoundError()
  136. 262 with timeout_manager(proc, timeout) as error_string:
  137.  
  138. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  139.  
  140. During handling of the above exception, another exception occurred:
  141.  
  142. Exception Traceback (most recent call last)
  143. Cell In[8], line 2
  144. 1 print('##active_line1##')
  145. ----> 2 computer.display.view()
  146.  
  147. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  148. 59 def view(self, show=True, quadrant=None):
  149. 60 """
  150. 61 Redirects to self.screenshot
  151. 62 """
  152. ---> 63 return self.screenshot(show, quadrant)
  153.  
  154.  
  155. computer.display.view()
  156.  
  157.  
  158. Output truncated. Showing the last 2800 characters.
  159.  
  160. 'input_filename': input_filename,
  161. 280 'output_filename_base': temp_name,
  162. (...)
  163. 285 'timeout': timeout,
  164. 286 }
  165. --> 288 run_tesseract(**kwargs)
  166. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  167.  
  168. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
  169. lang, config, nice, timeout)
  170. 259 else:
  171. --> 260 raise TesseractNotFoundError()
  172. 262 with timeout_manager(proc, timeout) as error_string:
  173.  
  174. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  175.  
  176. During handling of the above exception, another exception occurred:
  177.  
  178. Exception Traceback (most recent call last)
  179. Cell In[8], line 2
  180. 1 print('##active_line1##')
  181. ----> 2 computer.display.view()
  182.  
  183. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  184. 59 def view(self, show=True, quadrant=None):
  185. 60 """
  186. 61 Redirects to self.screenshot
  187. 62 """
  188. ---> 63 return self.screenshot(show, quadrant)
  189.  
  190.  
  191. computer.display.view()
  192.  
  193.  
  194. Output truncated. Showing the last 2800 characters.
  195.  
  196. 'input_filename': input_filename,
  197. 280 'output_filename_base': temp_name,
  198. (...)
  199. 285 'timeout': timeout,
  200. 286 }
  201. --> 288 run_tesseract(**kwargs)
  202. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  203.  
  204. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension,
  205. lang, config, nice, timeout)
  206. 259 else:
  207. --> 260 raise TesseractNotFoundError()
  208. 262 with timeout_manager(proc, timeout) as error_string:
  209.  
  210. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  211.  
  212. During handling of the above exception, another exception occurred:
  213.  
  214. Exception Traceback (most recent call last)
  215. Cell In[8], line 2
  216. 1 print('##active_line1##')
  217. ----> 2 computer.display.view()
  218.  
  219. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  220. 59 def view(self, show=True, quadrant=None):
  221. 60 """
  222. 61 Redirects to self.screenshot
  223. 62 """
  224. ---> 63 return self.screenshot(show, quadrant)
  225.  
  226. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:75, in Display.screenshot(self, show, quadrant,
  227. active_app_only, force_image)
  228. 71 """
  229. 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
  230. you need it (rarely). **You almost always want to do this first!**
  231. 73 """
  232. 74 if not self.computer.emit_images and force_image == False:
  233. ---> 75 text = self.get_text_as_list_of_lists()
  234. 76 pp = pprint.PrettyPrinter(indent=4)
  235. 77 pretty_text = pp.pformat(text) # language models like it pretty!
  236.  
  237. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:258, in Display.get_text_as_list_of_lists(self,
  238. screenshot)
  239. 256 return pytesseract_get_text(screenshot)
  240. 257 except:
  241. --> 258 raise Exception(
  242. 259 "Failed to find text locally.\n\nTo find text in order to use the mouse, please make sure you've installed `pytesseract`
  243. along with the Tesseract executable (see this Stack Overflow answer for help installing Tesseract:
  244. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i)."
  245. 260 )
  246.  
  247. Exception: Failed to find text locally.
  248.  
  249. To find text in order to use the mouse, please make sure you've installed `pytesseract` along with the Tesseract executable (see this Stack
  250. Overflow answer for help installing Tesseract:
  251. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i).
  252.  
  253.  
  254. First, let's install pytesseract and Tesseract. We can try:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement