Guest User

Untitled

a guest
Apr 22nd, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.25 KB | None | 0 0
  1. (oi) C:\Users\ivan>interpreter --api_base "https://api.groq.com/openai/v1" --api_key "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" --model "llama3-8b-8192" --context_window 8000 --os --no-llm_supports_vision
  2.  
  3. ▌ OS Control enabled
  4.  
  5. > podes decirme cuantos mensajes sin leer tengo en el whatsap que esta minimizado en mi pantalla?
  6.  
  7. Let's see if we can figure this out.
  8.  
  9. First, I'll try to bring the minimized WhatsApp window into focus.
  10.  
  11.  
  12.  
  13. import computer
  14.  
  15. # Focus on the WhatsApp window
  16. computer.display.view()
  17. computer.mouse.move("WhatsApp")
  18. computer.mouse.click()
  19.  
  20. # Count the number of unread messages
  21. count = computer.clipboard.view().count(": )")
  22. print(f"You have {count} unread messages in WhatsApp")
  23.  
  24.  
  25. Output truncated. Showing the last 2800 characters.
  26.  
  27. )
  28. 285 'timeout': timeout,
  29. 286 }
  30. --> 288 run_tesseract(**kwargs)
  31. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  32.  
  33. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  34. config, nice, timeout)
  35. 259 else:
  36. --> 260 raise TesseractNotFoundError()
  37. 262 with timeout_manager(proc, timeout) as error_string:
  38.  
  39. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  40.  
  41. During handling of the above exception, another exception occurred:
  42.  
  43. Exception Traceback (most recent call last)
  44. Cell In[11], line 8
  45. 6 pass
  46. 7 print('##active_line4##')
  47. ----> 8 computer.display.view()
  48. 9 print('##active_line5##')
  49. 10 computer.mouse.move('WhatsApp')
  50.  
  51. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  52. 59 def view(self, show=True, quadrant=None):
  53.  
  54.  
  55. import computer
  56.  
  57. # Focus on the WhatsApp window
  58. computer.display.view()
  59. computer.mouse.move("WhatsApp")
  60. computer.mouse.click()
  61.  
  62. # Count the number of unread messages
  63. count = computer.clipboard.view().count(": )")
  64. print(f"You have {count} unread messages in WhatsApp")
  65.  
  66.  
  67. Output truncated. Showing the last 2800 characters.
  68.  
  69. )
  70. 285 'timeout': timeout,
  71. 286 }
  72. --> 288 run_tesseract(**kwargs)
  73. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  74.  
  75. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  76. config, nice, timeout)
  77. 259 else:
  78. --> 260 raise TesseractNotFoundError()
  79. 262 with timeout_manager(proc, timeout) as error_string:
  80.  
  81. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  82.  
  83. During handling of the above exception, another exception occurred:
  84.  
  85. Exception Traceback (most recent call last)
  86. Cell In[11], line 8
  87. 6 pass
  88. 7 print('##active_line4##')
  89. ----> 8 computer.display.view()
  90. 9 print('##active_line5##')
  91. 10 computer.mouse.move('WhatsApp')
  92.  
  93. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  94. 59 def view(self, show=True, quadrant=None):
  95.  
  96.  
  97. import computer
  98.  
  99. # Focus on the WhatsApp window
  100. computer.display.view()
  101. computer.mouse.move("WhatsApp")
  102. computer.mouse.click()
  103.  
  104. # Count the number of unread messages
  105. count = computer.clipboard.view().count(": )")
  106. print(f"You have {count} unread messages in WhatsApp")
  107.  
  108.  
  109. Output truncated. Showing the last 2800 characters.
  110.  
  111. )
  112. 285 'timeout': timeout,
  113. 286 }
  114. --> 288 run_tesseract(**kwargs)
  115. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  116.  
  117. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  118. config, nice, timeout)
  119. 259 else:
  120. --> 260 raise TesseractNotFoundError()
  121. 262 with timeout_manager(proc, timeout) as error_string:
  122.  
  123. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  124.  
  125. During handling of the above exception, another exception occurred:
  126.  
  127. Exception Traceback (most recent call last)
  128. Cell In[11], line 8
  129. 6 pass
  130. 7 print('##active_line4##')
  131. ----> 8 computer.display.view()
  132. 9 print('##active_line5##')
  133. 10 computer.mouse.move('WhatsApp')
  134.  
  135. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  136. 59 def view(self, show=True, quadrant=None):
  137.  
  138.  
  139. import computer
  140.  
  141. # Focus on the WhatsApp window
  142. computer.display.view()
  143. computer.mouse.move("WhatsApp")
  144. computer.mouse.click()
  145.  
  146. # Count the number of unread messages
  147. count = computer.clipboard.view().count(": )")
  148. print(f"You have {count} unread messages in WhatsApp")
  149.  
  150.  
  151. Output truncated. Showing the last 2800 characters.
  152.  
  153. )
  154. 285 'timeout': timeout,
  155. 286 }
  156. --> 288 run_tesseract(**kwargs)
  157. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  158.  
  159. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  160. config, nice, timeout)
  161. 259 else:
  162. --> 260 raise TesseractNotFoundError()
  163. 262 with timeout_manager(proc, timeout) as error_string:
  164.  
  165. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  166.  
  167. During handling of the above exception, another exception occurred:
  168.  
  169. Exception Traceback (most recent call last)
  170. Cell In[11], line 8
  171. 6 pass
  172. 7 print('##active_line4##')
  173. ----> 8 computer.display.view()
  174. 9 print('##active_line5##')
  175. 10 computer.mouse.move('WhatsApp')
  176.  
  177. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  178. 59 def view(self, show=True, quadrant=None):
  179.  
  180.  
  181. import computer
  182.  
  183. # Focus on the WhatsApp window
  184. computer.display.view()
  185. computer.mouse.move("WhatsApp")
  186. computer.mouse.click()
  187.  
  188. # Count the number of unread messages
  189. count = computer.clipboard.view().count(": )")
  190. print(f"You have {count} unread messages in WhatsApp")
  191.  
  192.  
  193. Output truncated. Showing the last 2800 characters.
  194.  
  195. )
  196. 285 'timeout': timeout,
  197. 286 }
  198. --> 288 run_tesseract(**kwargs)
  199. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  200.  
  201. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  202. config, nice, timeout)
  203. 259 else:
  204. --> 260 raise TesseractNotFoundError()
  205. 262 with timeout_manager(proc, timeout) as error_string:
  206.  
  207. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  208.  
  209. During handling of the above exception, another exception occurred:
  210.  
  211. Exception Traceback (most recent call last)
  212. Cell In[11], line 8
  213. 6 pass
  214. 7 print('##active_line4##')
  215. ----> 8 computer.display.view()
  216. 9 print('##active_line5##')
  217. 10 computer.mouse.move('WhatsApp')
  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.  
  222.  
  223. import computer
  224.  
  225. # Focus on the WhatsApp window
  226. computer.display.view()
  227. computer.mouse.move("WhatsApp")
  228. computer.mouse.click()
  229.  
  230. # Count the number of unread messages
  231. count = computer.clipboard.view().count(": )")
  232. print(f"You have {count} unread messages in WhatsApp")
  233.  
  234.  
  235. Output truncated. Showing the last 2800 characters.
  236.  
  237. )
  238. 285 'timeout': timeout,
  239. 286 }
  240. --> 288 run_tesseract(**kwargs)
  241. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  242.  
  243. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  244. config, nice, timeout)
  245. 259 else:
  246. --> 260 raise TesseractNotFoundError()
  247. 262 with timeout_manager(proc, timeout) as error_string:
  248.  
  249. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  250.  
  251. During handling of the above exception, another exception occurred:
  252.  
  253. Exception Traceback (most recent call last)
  254. Cell In[11], line 8
  255. 6 pass
  256. 7 print('##active_line4##')
  257. ----> 8 computer.display.view()
  258. 9 print('##active_line5##')
  259. 10 computer.mouse.move('WhatsApp')
  260.  
  261. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  262. 59 def view(self, show=True, quadrant=None):
  263. 60 """
  264. 61 Redirects to self.screenshot
  265. 62 """
  266. ---> 63 return self.screenshot(show, quadrant)
  267.  
  268. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:75, in Display.screenshot(self, show, quadrant, active_app_only,
  269. force_image)
  270. 71 """
  271. 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
  272. (rarely). **You almost always want to do this first!**
  273. 73 """
  274. 74 if not self.computer.emit_images and force_image == False:
  275. ---> 75 text = self.get_text_as_list_of_lists()
  276. 76 pp = pprint.PrettyPrinter(indent=4)
  277. 77 pretty_text = pp.pformat(text) # language models like it pretty!
  278.  
  279. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:258, in Display.get_text_as_list_of_lists(self, screenshot)
  280. 256 return pytesseract_get_text(screenshot)
  281. 257 except:
  282. --> 258 raise Exception(
  283. 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
  284. Tesseract executable (see this Stack Overflow answer for help installing Tesseract:
  285. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i)."
  286. 260 )
  287.  
  288. Exception: Failed to find text locally.
  289.  
  290. 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
  291. answer for help installing Tesseract:
  292. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i).
  293.  
  294.  
  295. It looks like there was an error in the code. I believe it's because Tesseract is not installed or not in the PATH.
  296.  
  297. Before we can continue, we need to install and configure Tesseract.
  298.  
  299. Let me help you with that!
  300.  
  301. Let's try to install Tesseract and configure it.
  302.  
  303.  
  304.  
  305. !pip install pytesseract
  306. !pip install Pillow
  307. !pip install opencv-
  308.  
  309. import pytesseract
  310. import pillow
  311. import cv2
  312.  
  313. print("Tesseract installed!")
  314.  
  315.  
  316. Requirement already satisfied: pytesseract in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (0.3.10)
  317. Requirement already satisfied: packaging>=21.3 in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (from pytesseract) (23.2)
  318. Requirement already satisfied: Pillow>=8.0.0 in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (from pytesseract) (10.2.0)
  319. Requirement already satisfied: Pillow in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (10.2.0)
  320. ERROR: Invalid requirement: 'opencv-'
  321. ---------------------------------------------------------------------------
  322. ModuleNotFoundError Traceback (most recent call last)
  323. Cell In[20], line 5
  324. 3 get_ipython().system('pip install opencv-')
  325. 4 import pytesseract
  326. ----> 5 import pillow
  327. 6 import cv2
  328. 7 print("Tesseract installed!")
  329.  
  330. ModuleNotFoundError: No module named 'pillow'
  331.  
  332.  
  333. It looks like we missed installing Pillow!
  334.  
  335. Let's fix this. We'll install Pillow and then import it correctly.
  336.  
  337. Here's the updated code:
  338.  
  339.  
  340.  
  341. !pip install Pillow
  342.  
  343. import pytesseract
  344. import pillow
  345. import cv2
  346. print("Tesseract installed!")
  347.  
  348.  
  349. Requirement already satisfied: Pillow in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (10.2.0)
  350. ---------------------------------------------------------------------------
  351. ModuleNotFoundError Traceback (most recent call last)
  352. Cell In[26], line 3
  353. 1 get_ipython().system('pip install Pillow')
  354. 2 import pytesseract
  355. ----> 3 import pillow
  356. 4 import cv2
  357. 5 print("Tesseract installed!")
  358.  
  359. ModuleNotFoundError: No module named 'pillow'
  360.  
  361.  
  362. Let's try to import Pillow correctly.
  363.  
  364. Here's the updated code:
  365.  
  366.  
  367. from PIL import Image
  368.  
  369. print("Pillow imported!")
  370.  
  371.  
  372. Pillow imported!
  373.  
  374.  
  375. You're back to the original goal!
  376.  
  377. Let's get back to the task at hand.
  378.  
  379. To find out how many unread messages you have in WhatsApp, we need to get the number of messages in the WhatsApp chat and then count the ones that are
  380. unchecked.
  381.  
  382. Here's the updated code:
  383.  
  384.  
  385.  
  386. import computer
  387.  
  388. # Focus on the WhatsApp window
  389. computer.display.view()
  390. computer.mouse.move("WhatsApp")
  391. computer.mouse.click()
  392.  
  393. # Count the number of unread messages
  394. count = computer.clipboard.view().count(":))")
  395. print(f"You have {count} unread messages in WhatsApp")
  396.  
  397.  
  398. Output truncated. Showing the last 2800 characters.
  399.  
  400. )
  401. 285 'timeout': timeout,
  402. 286 }
  403. --> 288 run_tesseract(**kwargs)
  404. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  405.  
  406. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  407. config, nice, timeout)
  408. 259 else:
  409. --> 260 raise TesseractNotFoundError()
  410. 262 with timeout_manager(proc, timeout) as error_string:
  411.  
  412. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  413.  
  414. During handling of the above exception, another exception occurred:
  415.  
  416. Exception Traceback (most recent call last)
  417. Cell In[38], line 8
  418. 6 pass
  419. 7 print('##active_line4##')
  420. ----> 8 computer.display.view()
  421. 9 print('##active_line5##')
  422. 10 computer.mouse.move('WhatsApp')
  423.  
  424. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  425. 59 def view(self, show=True, quadrant=None):
  426.  
  427.  
  428. import computer
  429.  
  430. # Focus on the WhatsApp window
  431. computer.display.view()
  432. computer.mouse.move("WhatsApp")
  433. computer.mouse.click()
  434.  
  435. # Count the number of unread messages
  436. count = computer.clipboard.view().count(":))")
  437. print(f"You have {count} unread messages in WhatsApp")
  438.  
  439.  
  440. Output truncated. Showing the last 2800 characters.
  441.  
  442. )
  443. 285 'timeout': timeout,
  444. 286 }
  445. --> 288 run_tesseract(**kwargs)
  446. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  447.  
  448. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  449. config, nice, timeout)
  450. 259 else:
  451. --> 260 raise TesseractNotFoundError()
  452. 262 with timeout_manager(proc, timeout) as error_string:
  453.  
  454. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  455.  
  456. During handling of the above exception, another exception occurred:
  457.  
  458. Exception Traceback (most recent call last)
  459. Cell In[38], line 8
  460. 6 pass
  461. 7 print('##active_line4##')
  462. ----> 8 computer.display.view()
  463. 9 print('##active_line5##')
  464. 10 computer.mouse.move('WhatsApp')
  465.  
  466. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  467. 59 def view(self, show=True, quadrant=None):
  468.  
  469.  
  470. import computer
  471.  
  472. # Focus on the WhatsApp window
  473. computer.display.view()
  474. computer.mouse.move("WhatsApp")
  475. computer.mouse.click()
  476.  
  477. # Count the number of unread messages
  478. count = computer.clipboard.view().count(":))")
  479. print(f"You have {count} unread messages in WhatsApp")
  480.  
  481.  
  482. Output truncated. Showing the last 2800 characters.
  483.  
  484. )
  485. 285 'timeout': timeout,
  486. 286 }
  487. --> 288 run_tesseract(**kwargs)
  488. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  489.  
  490. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  491. config, nice, timeout)
  492. 259 else:
  493. --> 260 raise TesseractNotFoundError()
  494. 262 with timeout_manager(proc, timeout) as error_string:
  495.  
  496. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  497.  
  498. During handling of the above exception, another exception occurred:
  499.  
  500. Exception Traceback (most recent call last)
  501. Cell In[38], line 8
  502. 6 pass
  503. 7 print('##active_line4##')
  504. ----> 8 computer.display.view()
  505. 9 print('##active_line5##')
  506. 10 computer.mouse.move('WhatsApp')
  507.  
  508. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  509. 59 def view(self, show=True, quadrant=None):
  510.  
  511.  
  512. import computer
  513.  
  514. # Focus on the WhatsApp window
  515. computer.display.view()
  516. computer.mouse.move("WhatsApp")
  517. computer.mouse.click()
  518.  
  519. # Count the number of unread messages
  520. count = computer.clipboard.view().count(":))")
  521. print(f"You have {count} unread messages in WhatsApp")
  522.  
  523.  
  524. Output truncated. Showing the last 2800 characters.
  525.  
  526. )
  527. 285 'timeout': timeout,
  528. 286 }
  529. --> 288 run_tesseract(**kwargs)
  530. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  531.  
  532. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  533. config, nice, timeout)
  534. 259 else:
  535. --> 260 raise TesseractNotFoundError()
  536. 262 with timeout_manager(proc, timeout) as error_string:
  537.  
  538. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  539.  
  540. During handling of the above exception, another exception occurred:
  541.  
  542. Exception Traceback (most recent call last)
  543. Cell In[38], line 8
  544. 6 pass
  545. 7 print('##active_line4##')
  546. ----> 8 computer.display.view()
  547. 9 print('##active_line5##')
  548. 10 computer.mouse.move('WhatsApp')
  549.  
  550. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  551. 59 def view(self, show=True, quadrant=None):
  552.  
  553.  
  554. import computer
  555.  
  556. # Focus on the WhatsApp window
  557. computer.display.view()
  558. computer.mouse.move("WhatsApp")
  559. computer.mouse.click()
  560.  
  561. # Count the number of unread messages
  562. count = computer.clipboard.view().count(":))")
  563. print(f"You have {count} unread messages in WhatsApp")
  564.  
  565.  
  566. Output truncated. Showing the last 2800 characters.
  567.  
  568. )
  569. 285 'timeout': timeout,
  570. 286 }
  571. --> 288 run_tesseract(**kwargs)
  572. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  573.  
  574. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  575. config, nice, timeout)
  576. 259 else:
  577. --> 260 raise TesseractNotFoundError()
  578. 262 with timeout_manager(proc, timeout) as error_string:
  579.  
  580. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  581.  
  582. During handling of the above exception, another exception occurred:
  583.  
  584. Exception Traceback (most recent call last)
  585. Cell In[38], line 8
  586. 6 pass
  587. 7 print('##active_line4##')
  588. ----> 8 computer.display.view()
  589. 9 print('##active_line5##')
  590. 10 computer.mouse.move('WhatsApp')
  591.  
  592. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  593. 59 def view(self, show=True, quadrant=None):
  594.  
  595.  
  596. import computer
  597.  
  598. # Focus on the WhatsApp window
  599. computer.display.view()
  600. computer.mouse.move("WhatsApp")
  601. computer.mouse.click()
  602.  
  603. # Count the number of unread messages
  604. count = computer.clipboard.view().count(":))")
  605. print(f"You have {count} unread messages in WhatsApp")
  606.  
  607.  
  608. Output truncated. Showing the last 2800 characters.
  609.  
  610. )
  611. 285 'timeout': timeout,
  612. 286 }
  613. --> 288 run_tesseract(**kwargs)
  614. 289 filename = f"{kwargs['output_filename_base']}{extsep}{extension}"
  615.  
  616. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  617. config, nice, timeout)
  618. 259 else:
  619. --> 260 raise TesseractNotFoundError()
  620. 262 with timeout_manager(proc, timeout) as error_string:
  621.  
  622. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  623.  
  624. During handling of the above exception, another exception occurred:
  625.  
  626. Exception Traceback (most recent call last)
  627. Cell In[38], line 8
  628. 6 pass
  629. 7 print('##active_line4##')
  630. ----> 8 computer.display.view()
  631. 9 print('##active_line5##')
  632. 10 computer.mouse.move('WhatsApp')
  633.  
  634. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:63, in Display.view(self, show, quadrant)
  635. 59 def view(self, show=True, quadrant=None):
  636. 60 """
  637. 61 Redirects to self.screenshot
  638. 62 """
  639. ---> 63 return self.screenshot(show, quadrant)
  640.  
  641. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:75, in Display.screenshot(self, show, quadrant, active_app_only,
  642. force_image)
  643. 71 """
  644. 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
  645. (rarely). **You almost always want to do this first!**
  646. 73 """
  647. 74 if not self.computer.emit_images and force_image == False:
  648. ---> 75 text = self.get_text_as_list_of_lists()
  649. 76 pp = pprint.PrettyPrinter(indent=4)
  650. 77 pretty_text = pp.pformat(text) # language models like it pretty!
  651.  
  652. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:258, in Display.get_text_as_list_of_lists(self, screenshot)
  653. 256 return pytesseract_get_text(screenshot)
  654. 257 except:
  655. --> 258 raise Exception(
  656. 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
  657. Tesseract executable (see this Stack Overflow answer for help installing Tesseract:
  658. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i)."
  659. 260 )
  660.  
  661. Exception: Failed to find text locally.
  662.  
  663. 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
  664. answer for help installing Tesseract:
  665. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i).
  666.  
  667.  
  668. It looks like we have an issue with installation!
  669.  
  670. Let's try installingpytesseract correctly.
  671.  
  672. Here's the updated code:
  673.  
  674.  
  675.  
  676. !pip install pytesseract
  677. !pip install pillow
  678. import pytesseract
  679. from PIL import Image
  680. import cv2
  681.  
  682. # Rest of the code...
  683.  
  684.  
  685. Requirement already satisfied: pytesseract in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (0.3.10)
  686. Requirement already satisfied: packaging>=21.3 in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (from pytesseract) (23.2)
  687. Requirement already satisfied: Pillow>=8.0.0 in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (from pytesseract) (10.2.0)
  688. Requirement already satisfied: pillow in c:\users\ivan\anaconda3\envs\oi\lib\site-packages (10.2.0)
  689.  
  690.  
  691. It looks like we're all set!
  692.  
  693. Let's run the code again and see what happens.
  694.  
  695. Here's the updated code:
  696.  
  697.  
  698.  
  699. import pytesseract
  700. from PIL import Image
  701. import cv2
  702. import computer
  703.  
  704. # Focus on the WhatsApp window
  705. computer.mouse.move("WhatsApp")
  706. computer.mouse.click()
  707.  
  708. # Count the number of unread messages
  709. count = computer.clipboard.view().count(":))")
  710. print(f"You have {count} unread messages in WhatsApp")
  711.  
  712.  
  713. Output truncated. Showing the last 2800 characters.
  714.  
  715.  
  716.  
  717. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  718. config, nice, timeout)
  719. 259 else:
  720. --> 260 raise TesseractNotFoundError()
  721. 262 with timeout_manager(proc, timeout) as error_string:
  722.  
  723. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  724.  
  725. During handling of the above exception, another exception occurred:
  726.  
  727. Exception Traceback (most recent call last)
  728. Cell In[53], line 14
  729. 12 pass
  730. 13 print('##active_line7##')
  731. ---> 14 computer.mouse.move('WhatsApp')
  732. 15 print('##active_line8##')
  733. 16 computer.mouse.click()
  734.  
  735. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\mouse\mouse.py:53, in Mouse.move(self, x, y, icon, text, screenshot, *args)
  736. 50 text = args[0]
  737. 52 if screenshot == None:
  738. ---> 53 screenshot = self.computer.display.screenshot(show=False)
  739.  
  740.  
  741. import pytesseract
  742. from PIL import Image
  743. import cv2
  744. import computer
  745.  
  746. # Focus on the WhatsApp window
  747. computer.mouse.move("WhatsApp")
  748. computer.mouse.click()
  749.  
  750. # Count the number of unread messages
  751. count = computer.clipboard.view().count(":))")
  752. print(f"You have {count} unread messages in WhatsApp")
  753.  
  754.  
  755. Output truncated. Showing the last 2800 characters.
  756.  
  757.  
  758.  
  759. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  760. config, nice, timeout)
  761. 259 else:
  762. --> 260 raise TesseractNotFoundError()
  763. 262 with timeout_manager(proc, timeout) as error_string:
  764.  
  765. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  766.  
  767. During handling of the above exception, another exception occurred:
  768.  
  769. Exception Traceback (most recent call last)
  770. Cell In[53], line 14
  771. 12 pass
  772. 13 print('##active_line7##')
  773. ---> 14 computer.mouse.move('WhatsApp')
  774. 15 print('##active_line8##')
  775. 16 computer.mouse.click()
  776.  
  777. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\mouse\mouse.py:53, in Mouse.move(self, x, y, icon, text, screenshot, *args)
  778. 50 text = args[0]
  779. 52 if screenshot == None:
  780. ---> 53 screenshot = self.computer.display.screenshot(show=False)
  781.  
  782.  
  783. import pytesseract
  784. from PIL import Image
  785. import cv2
  786. import computer
  787.  
  788. # Focus on the WhatsApp window
  789. computer.mouse.move("WhatsApp")
  790. computer.mouse.click()
  791.  
  792. # Count the number of unread messages
  793. count = computer.clipboard.view().count(":))")
  794. print(f"You have {count} unread messages in WhatsApp")
  795.  
  796.  
  797. Output truncated. Showing the last 2800 characters.
  798.  
  799.  
  800.  
  801. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  802. config, nice, timeout)
  803. 259 else:
  804. --> 260 raise TesseractNotFoundError()
  805. 262 with timeout_manager(proc, timeout) as error_string:
  806.  
  807. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  808.  
  809. During handling of the above exception, another exception occurred:
  810.  
  811. Exception Traceback (most recent call last)
  812. Cell In[53], line 14
  813. 12 pass
  814. 13 print('##active_line7##')
  815. ---> 14 computer.mouse.move('WhatsApp')
  816. 15 print('##active_line8##')
  817. 16 computer.mouse.click()
  818.  
  819. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\mouse\mouse.py:53, in Mouse.move(self, x, y, icon, text, screenshot, *args)
  820. 50 text = args[0]
  821. 52 if screenshot == None:
  822. ---> 53 screenshot = self.computer.display.screenshot(show=False)
  823.  
  824.  
  825. import pytesseract
  826. from PIL import Image
  827. import cv2
  828. import computer
  829.  
  830. # Focus on the WhatsApp window
  831. computer.mouse.move("WhatsApp")
  832. computer.mouse.click()
  833.  
  834. # Count the number of unread messages
  835. count = computer.clipboard.view().count(":))")
  836. print(f"You have {count} unread messages in WhatsApp")
  837.  
  838.  
  839. Output truncated. Showing the last 2800 characters.
  840.  
  841.  
  842.  
  843. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  844. config, nice, timeout)
  845. 259 else:
  846. --> 260 raise TesseractNotFoundError()
  847. 262 with timeout_manager(proc, timeout) as error_string:
  848.  
  849. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  850.  
  851. During handling of the above exception, another exception occurred:
  852.  
  853. Exception Traceback (most recent call last)
  854. Cell In[53], line 14
  855. 12 pass
  856. 13 print('##active_line7##')
  857. ---> 14 computer.mouse.move('WhatsApp')
  858. 15 print('##active_line8##')
  859. 16 computer.mouse.click()
  860.  
  861. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\mouse\mouse.py:53, in Mouse.move(self, x, y, icon, text, screenshot, *args)
  862. 50 text = args[0]
  863. 52 if screenshot == None:
  864. ---> 53 screenshot = self.computer.display.screenshot(show=False)
  865.  
  866.  
  867. import pytesseract
  868. from PIL import Image
  869. import cv2
  870. import computer
  871.  
  872. # Focus on the WhatsApp window
  873. computer.mouse.move("WhatsApp")
  874. computer.mouse.click()
  875.  
  876. # Count the number of unread messages
  877. count = computer.clipboard.view().count(":))")
  878. print(f"You have {count} unread messages in WhatsApp")
  879.  
  880.  
  881. Output truncated. Showing the last 2800 characters.
  882.  
  883.  
  884.  
  885. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  886. config, nice, timeout)
  887. 259 else:
  888. --> 260 raise TesseractNotFoundError()
  889. 262 with timeout_manager(proc, timeout) as error_string:
  890.  
  891. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  892.  
  893. During handling of the above exception, another exception occurred:
  894.  
  895. Exception Traceback (most recent call last)
  896. Cell In[53], line 14
  897. 12 pass
  898. 13 print('##active_line7##')
  899. ---> 14 computer.mouse.move('WhatsApp')
  900. 15 print('##active_line8##')
  901. 16 computer.mouse.click()
  902.  
  903. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\mouse\mouse.py:53, in Mouse.move(self, x, y, icon, text, screenshot, *args)
  904. 50 text = args[0]
  905. 52 if screenshot == None:
  906. ---> 53 screenshot = self.computer.display.screenshot(show=False)
  907.  
  908.  
  909. import pytesseract
  910. from PIL import Image
  911. import cv2
  912. import computer
  913.  
  914. # Focus on the WhatsApp window
  915. computer.mouse.move("WhatsApp")
  916. computer.mouse.click()
  917.  
  918. # Count the number of unread messages
  919. count = computer.clipboard.view().count(":))")
  920. print(f"You have {count} unread messages in WhatsApp")
  921.  
  922.  
  923. Output truncated. Showing the last 2800 characters.
  924.  
  925.  
  926.  
  927. File ~\anaconda3\envs\oi\Lib\site-packages\pytesseract\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang,
  928. config, nice, timeout)
  929. 259 else:
  930. --> 260 raise TesseractNotFoundError()
  931. 262 with timeout_manager(proc, timeout) as error_string:
  932.  
  933. TesseractNotFoundError: tesseract is not installed or it's not in your PATH. See README file for more information.
  934.  
  935. During handling of the above exception, another exception occurred:
  936.  
  937. Exception Traceback (most recent call last)
  938. Cell In[53], line 14
  939. 12 pass
  940. 13 print('##active_line7##')
  941. ---> 14 computer.mouse.move('WhatsApp')
  942. 15 print('##active_line8##')
  943. 16 computer.mouse.click()
  944.  
  945. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\mouse\mouse.py:53, in Mouse.move(self, x, y, icon, text, screenshot, *args)
  946. 50 text = args[0]
  947. 52 if screenshot == None:
  948. ---> 53 screenshot = self.computer.display.screenshot(show=False)
  949. 55 coordinates = self.computer.display.find(
  950. 56 '"' + text + '"', screenshot=screenshot
  951. 57 )
  952. 59 is_fuzzy = any([c["similarity"] != 1 for c in coordinates])
  953.  
  954. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:75, in Display.screenshot(self, show, quadrant, active_app_only,
  955. force_image)
  956. 71 """
  957. 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
  958. (rarely). **You almost always want to do this first!**
  959. 73 """
  960. 74 if not self.computer.emit_images and force_image == False:
  961. ---> 75 text = self.get_text_as_list_of_lists()
  962. 76 pp = pprint.PrettyPrinter(indent=4)
  963. 77 pretty_text = pp.pformat(text) # language models like it pretty!
  964.  
  965. File ~\anaconda3\envs\oi\Lib\site-packages\interpreter\core\computer\display\display.py:258, in Display.get_text_as_list_of_lists(self, screenshot)
  966. 256 return pytesseract_get_text(screenshot)
  967. 257 except:
  968. --> 258 raise Exception(
  969. 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
  970. Tesseract executable (see this Stack Overflow answer for help installing Tesseract:
  971. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i)."
  972. 260 )
  973.  
  974. Exception: Failed to find text locally.
  975.  
  976. 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
  977. answer for help installing Tesseract:
  978. https://stackoverflow.com/questions/50951955/pytesseract-tesseractnotfound-error-tesseract-is-not-installed-or-its-not-i).
  979.  
  980.  
  981. It seems like we've hit a roadblock!
  982.  
  983. Let's try to install Tesseract and see if that solves the issue. Remember to follow the link provided in the error message for help installing
  984. Tesseract.
  985.  
  986. Here's the updated code:
  987.  
  988.  
  989.  
  990. !pip install tesseract-ocr
  991.  
  992.  
  993. Output truncated. Showing the last 2800 characters.
  994.  
  995. ror: subprocess-exited-with-error
  996.  
  997. python setup.py bdist_wheel did not run successfully.
  998. exit code: 1
  999.  
  1000. [29 lines of output]
  1001. C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  1002. !!
  1003.  
  1004. ********************************************************************************
  1005. Usage of dash-separated 'description-file' will not be supported in future
  1006. versions. Please use the underscore name 'description_file' instead.
  1007.  
  1008. This deprecation is overdue, please update your project and remove deprecated
  1009. calls to avoid build errors in the future.
  1010.  
  1011. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
  1012.  
  1013.  
  1014. !pip install tesseract-ocr
  1015.  
  1016.  
  1017. Output truncated. Showing the last 2800 characters.
  1018.  
  1019. ror: subprocess-exited-with-error
  1020.  
  1021. python setup.py bdist_wheel did not run successfully.
  1022. exit code: 1
  1023.  
  1024. [29 lines of output]
  1025. C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  1026. !!
  1027.  
  1028. ********************************************************************************
  1029. Usage of dash-separated 'description-file' will not be supported in future
  1030. versions. Please use the underscore name 'description_file' instead.
  1031.  
  1032. This deprecation is overdue, please update your project and remove deprecated
  1033. calls to avoid build errors in the future.
  1034.  
  1035. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
  1036.  
  1037.  
  1038. !pip install tesseract-ocr
  1039.  
  1040.  
  1041. Output truncated. Showing the last 2800 characters.
  1042.  
  1043. ror: subprocess-exited-with-error
  1044.  
  1045. python setup.py bdist_wheel did not run successfully.
  1046. exit code: 1
  1047.  
  1048. [29 lines of output]
  1049. C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  1050. !!
  1051.  
  1052. ********************************************************************************
  1053. Usage of dash-separated 'description-file' will not be supported in future
  1054. versions. Please use the underscore name 'description_file' instead.
  1055.  
  1056. This deprecation is overdue, please update your project and remove deprecated
  1057. calls to avoid build errors in the future.
  1058.  
  1059. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
  1060.  
  1061.  
  1062. !pip install tesseract-ocr
  1063.  
  1064.  
  1065. Output truncated. Showing the last 2800 characters.
  1066.  
  1067. ror: subprocess-exited-with-error
  1068.  
  1069. python setup.py bdist_wheel did not run successfully.
  1070. exit code: 1
  1071.  
  1072. [29 lines of output]
  1073. C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  1074. !!
  1075.  
  1076. ********************************************************************************
  1077. Usage of dash-separated 'description-file' will not be supported in future
  1078. versions. Please use the underscore name 'description_file' instead.
  1079.  
  1080. This deprecation is overdue, please update your project and remove deprecated
  1081. calls to avoid build errors in the future.
  1082.  
  1083. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
  1084.  
  1085.  
  1086. !pip install tesseract-ocr
  1087.  
  1088.  
  1089. Output truncated. Showing the last 2800 characters.
  1090.  
  1091. ror: subprocess-exited-with-error
  1092.  
  1093. python setup.py bdist_wheel did not run successfully.
  1094. exit code: 1
  1095.  
  1096. [29 lines of output]
  1097. C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  1098. !!
  1099.  
  1100. ********************************************************************************
  1101. Usage of dash-separated 'description-file' will not be supported in future
  1102. versions. Please use the underscore name 'description_file' instead.
  1103.  
  1104. This deprecation is overdue, please update your project and remove deprecated
  1105. calls to avoid build errors in the future.
  1106.  
  1107. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
  1108.  
  1109.  
  1110. !pip install tesseract-ocr
  1111.  
  1112.  
  1113. Output truncated. Showing the last 2800 characters.
  1114.  
  1115. ror: subprocess-exited-with-error
  1116.  
  1117. python setup.py bdist_wheel did not run successfully.
  1118. exit code: 1
  1119.  
  1120. [29 lines of output]
  1121. C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\setuptools\dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  1122. !!
  1123.  
  1124. ********************************************************************************
  1125. Usage of dash-separated 'description-file' will not be supported in future
  1126. versions. Please use the underscore name 'description_file' instead.
  1127.  
  1128. This deprecation is overdue, please update your project and remove deprecated
  1129. calls to avoid build errors in the future.
  1130.  
  1131. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
  1132. ********************************************************************************
  1133.  
  1134. !!
  1135. opt = self.warn_dash_deprecation(opt, section)
  1136. running bdist_wheel
  1137. running build
  1138. running build_py
  1139. file tesseract_ocr.py (for module tesseract_ocr) not found
  1140. file tesseract_ocr.py (for module tesseract_ocr) not found
  1141. running build_ext
  1142. building 'tesseract_ocr' extension
  1143. creating build
  1144. creating build\temp.win-amd64-cpython-311
  1145. creating build\temp.win-amd64-cpython-311\Release
  1146. "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD
  1147. -IC:\Users\ivan\anaconda3\envs\oi\include -IC:\Users\ivan\anaconda3\envs\oi\Include "-IC:\Program Files\Microsoft Visual
  1148. Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include" "-IC:\Program Files\Microsoft Visual
  1149. Studio\2022\Community\VC\Tools\MSVC\14.38.33130\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include"
  1150. "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program
  1151. Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files
  1152. (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /EHsc /Tptesseract_ocr.cpp /Fobuild\temp.win-amd64-cpython-311\Release\tesseract_ocr.obj
  1153. tesseract_ocr.cpp
  1154. tesseract_ocr.cpp(264): fatal error C1083: Cannot open include file: 'leptonica/allheaders.h': No such file or directory
  1155. error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit
  1156. code 2
  1157.  
  1158.  
  1159. note: This error originates from a subprocess, and is likely not a problem with pip.
  1160. ERROR: Failed building wheel for tesseract-ocr
  1161. ERROR: Could not build wheels for tesseract-ocr, which is required to install pyproject.toml-based projects
  1162.  
  1163.  
  1164. It looks like we've encountered an error when trying to install Tesseract-OCR. It seems like there was a problem building the wheel for the
  1165. Tesseract-OCR package.
  1166.  
  1167. Don't worry! We can try to troubleshoot this issue further. Let's first check if the package is already installed:
  1168.  
  1169.  
  1170.  
  1171. import os
  1172. import platform
  1173.  
  1174. # Check if Tesseract-OCR is installed
  1175. if not os.path.exists(os.path.join(os.environ['USERPROFILE'], 'Anaconda3', 'envs', 'oi', 'Lib', 'site-packages', 'pytesseract')):
  1176. print("Tesseract-OCR is not installed.")
  1177. # Try to install Tesseract-OCR
  1178. try:
  1179. !pip install tesseract-ocr
  1180. except Exception as e:
  1181. print(f"Error: {str(e)}")
  1182. # Check if installation was successful
  1183. if not os.path.exists(os.path.join(os.environ['USERPROFILE'], 'Anaconda3', 'envs', 'oi', 'Lib', 'site-packages', 'pytesseract')):
  1184. print("Failed to install Tesseract-OCR.")
  1185. else:
  1186. print("Tesseract-OCR installed successfully.")
  1187.  
  1188.  
  1189.  
  1190. Let's summarize what's happening on-screen.
  1191.  
  1192.  
  1193.  
  1194. # Ensure we're in the right window
  1195. computer.switch_desktop()
  1196.  
  1197. # Search Google for "Tesseract OCR"
  1198. computer.browser.search("Tesseract OCR")
  1199.  
  1200. # Wait for a few seconds to load the results
  1201. import time
  1202. time.sleep(5)
  1203.  
  1204. # Take a screenshot to verify the results are correct
  1205. import pytesseract
  1206. from PIL import ImageGrab
  1207.  
  1208. img = ImageGrab.grab(bbox=(0, 0, 1920, 1080))
  1209. img.save("screenshot.png")
  1210.  
  1211.  
  1212. ---------------------------------------------------------------------------
  1213. AttributeError Traceback (most recent call last)
  1214. Cell In[77], line 4
  1215. 2 pass
  1216. 3 print('##active_line2##')
  1217. ----> 4 computer.switch_desktop()
  1218. 5 print('##active_line3##')
  1219. 6 pass
  1220.  
  1221. AttributeError: 'Computer' object has no attribute 'switch_desktop'
  1222.  
  1223.  
  1224. Let's try to switch to a new active window.
  1225.  
  1226. Here's a Python code that switches to the new active window:
  1227.  
  1228.  
  1229.  
  1230. import computer
  1231.  
  1232. computer.keyboard.write("winkey+a") # Simulate pressing the Win key and 'a' key together to activate the application menu
  1233.  
  1234.  
  1235. [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
  1236. [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
  1237.  
  1238. Python Version: 3.11.7
  1239. Pip Version: 23.3.1
  1240. Open-interpreter Version: cmd: Open Interpreter 0.2.4 New Computer Update
  1241. , pkg: 0.2.4
  1242. OS Version and Architecture: Windows-10-10.0.19045-SP0
  1243. CPU Info: Intel64 Family 6 Model 165 Stepping 5, GenuineIntel
  1244. RAM Info: 31.87 GB, used: 6.94, free: 24.93
  1245.  
  1246.  
  1247. # Interpreter Info
  1248.  
  1249. Vision: False
  1250. Model: openai/llama3-8b-8192
  1251. Function calling: False
  1252. Context window: 8000
  1253. Max tokens: 4096
  1254.  
  1255. Auto run: True
  1256. API base: https://api.groq.com/openai/v1
  1257. Offline: False
  1258.  
  1259. Curl output: Not local
  1260.  
  1261. # Messages
  1262.  
  1263. System Message: You are Open Interpreter, a world-class programmer that can complete any goal by executing code.
  1264.  
  1265. When you write code, it will be executed **on the user's machine**. The user has given you **full and complete permission** to execute any code necessary to complete the task.
  1266.  
  1267. When a user refers to a filename, they're likely referring to an existing file in the directory you're currently executing code in.
  1268.  
  1269. In general, try to make plans with as few steps as possible. As for actually executing code to carry out that plan, **don't try to do everything in one code block.** You should try something, print information about it, then continue from there in tiny, informed steps. You will never get it on the first try, and attempting it in one go will often lead to errors you cant see.
  1270.  
  1271. Manually summarize text.
  1272.  
  1273. Do not try to write code that attempts the entire task at once, and verify at each step whether or not you're on track.
  1274.  
  1275. # Computer
  1276.  
  1277. You may use the `computer` Python module to complete tasks:
  1278.  
  1279. ```python
  1280. computer.browser.search(query) # Silently searches Google for the query, returns result. The user's browser is unaffected. (does not open a browser!)
  1281.  
  1282. computer.display.view() # Shows you what's on the screen, returns a `pil_image` `in case you need it (rarely). **You almost always want to do this first!**
  1283.  
  1284. computer.keyboard.hotkey(" ", "command") # Opens spotlight (very useful)
  1285. computer.keyboard.write("hello")
  1286.  
  1287. # Use this to click text:
  1288. computer.mouse.click("text onscreen") # This clicks on the UI element with that text. Use this **frequently** and get creative! To click a video, you could pass the *timestamp* (which is usually written on the thumbnail) into this.
  1289. # Use this to click an icon, button, or other symbol:
  1290. computer.mouse.click(icon="gear icon") # Moves mouse to the icon with that description. Use this very often.
  1291.  
  1292. computer.mouse.move("open recent >") # This moves the mouse over the UI element with that text. Many dropdowns will disappear if you click them. You have to hover over items to reveal more.
  1293. computer.mouse.click(x=500, y=500) # Use this very, very rarely. It's highly inaccurate
  1294.  
  1295. computer.mouse.scroll(-10) # Scrolls down. If you don't find some text on screen that you expected to be there, you probably want to do this
  1296. x, y = computer.display.center() # Get your bearings
  1297.  
  1298. computer.clipboard.view() # Returns contents of clipboard
  1299. computer.os.get_selected_text() # Use frequently. If editing text, the user often wants this
  1300.  
  1301. {{
  1302. import platform
  1303. if platform.system() == 'Darwin':
  1304. print('''
  1305. computer.browser.search(query) # Google search results will be returned from this function as a string
  1306. computer.files.edit(path_to_file, original_text, replacement_text) # Edit a file
  1307. computer.calendar.create_event(title="Meeting", start_date=datetime.datetime.now(), end=datetime.datetime.now() + datetime.timedelta(hours=1), notes="Note", location="") # Creates a calendar event
  1308. computer.calendar.get_events(start_date=datetime.date.today(), end_date=None) # Get events between dates. If end_date is None, only gets events for start_date
  1309. computer.calendar.delete_event(event_title="Meeting", start_date=datetime.datetime) # Delete a specific event with a matching title and start date, you may need to get use get_events() to find the specific event object first
  1310. computer.contacts.get_phone_number("John Doe")
  1311. computer.contacts.get_email_address("John Doe")
  1312. computer.mail.send("john@email.com", "Meeting Reminder", "Reminder that our meeting is at 3pm today.", ["path/to/attachment.pdf", "path/to/attachment2.pdf"]) # Send an email with a optional attachments
  1313. computer.mail.get(4, unread=True) # Returns the {number} of unread emails, or all emails if False is passed
  1314. computer.mail.unread_count() # Returns the number of unread emails
  1315. computer.sms.send("555-123-4567", "Hello from the computer!") # Send a text message. MUST be a phone number, so use computer.contacts.get_phone_number frequently here
  1316. ''')
  1317. }}
  1318.  
  1319. ```
  1320.  
  1321. For rare and complex mouse actions, consider using computer vision libraries on the `computer.display.view()` `pil_image` to produce a list of coordinates for the mouse to move/drag to.
  1322.  
  1323. If the user highlighted text in an editor, then asked you to modify it, they probably want you to `keyboard.write` over their version of the text.
  1324.  
  1325. Tasks are 100% computer-based. DO NOT simply write long messages to the user to complete tasks. You MUST put your text back into the program they're using to deliver your text!
  1326.  
  1327. Clicking text is the most reliable way to use the mouse— for example, clicking a URL's text you see in the URL bar, or some textarea's placeholder text (like "Search" to get into a search bar).
  1328.  
  1329. Applescript might be best for some tasks.
  1330.  
  1331. If you use `plt.show()`, the resulting image will be sent to you. However, if you use `PIL.Image.show()`, the resulting image will NOT be sent to you.
  1332.  
  1333. It is very important to make sure you are focused on the right application and window. Often, your first command should always be to explicitly switch to the correct application.
  1334.  
  1335. When searching the web, use query parameters. For example, https://www.amazon.com/s?k=monitor
  1336.  
  1337. Try multiple methods before saying the task is impossible. **You can do it!**
  1338.  
  1339. # Critical Routine Procedure for Multi-Step Tasks
  1340.  
  1341. Include `computer.display.view()` after a 2 second delay at the end of _every_ code block to verify your progress, then answer these questions in extreme detail:
  1342.  
  1343. 1. Generally, what is happening on-screen?
  1344. 2. What is the active app?
  1345. 3. What hotkeys does this app support that might get be closer to my goal?
  1346. 4. What text areas are active, if any?
  1347. 5. What text is selected?
  1348. 6. What options could you take next to get closer to your goal?
  1349.  
  1350. {{
  1351. # Add window information
  1352.  
  1353. try:
  1354.  
  1355. import pywinctl
  1356.  
  1357. active_window = pywinctl.getActiveWindow()
  1358.  
  1359. if active_window:
  1360. app_info = ""
  1361.  
  1362. if "_appName" in active_window.__dict__:
  1363. app_info += (
  1364. "Active Application: " + active_window.__dict__["_appName"]
  1365. )
  1366.  
  1367. if hasattr(active_window, "title"):
  1368. app_info += "\n" + "Active Window Title: " + active_window.title
  1369. elif "_winTitle" in active_window.__dict__:
  1370. app_info += (
  1371. "\n"
  1372. + "Active Window Title:"
  1373. + active_window.__dict__["_winTitle"]
  1374. )
  1375.  
  1376. if app_info != "":
  1377. print(
  1378. "\n\n# Important Information:\n"
  1379. + app_info
  1380. + "\n(If you need to be in another active application to help the user, you need to switch to it.)"
  1381. )
  1382.  
  1383. except:
  1384. # Non blocking
  1385. pass
  1386.  
  1387. }}
  1388.  
  1389. {'role': 'user', 'type': 'message', 'content': 'podes decirme cuantos mensajes sin leer tengo en el whatsap que esta minimizado en mi pantalla?'}
  1390.  
  1391. {'role': 'assistant', 'type': 'message', 'content': "Let's see if we can figure this out.\n\nFirst, I'll try to bring the minimized WhatsApp window into focus.\n\n\n\n"}
  1392.  
  1393. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\nimport computer\n\n# Focus on the WhatsApp window\ncomputer.display.view()\ncomputer.mouse.move("WhatsApp")\ncomputer.mouse.click()\n\n# Count the number of unread messages\ncount = computer.clipboard.view().count(": )")\nprint(f"You have {count} unread messages in WhatsApp")\n'}
  1394.  
  1395. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': 'Output truncated. Showing the last 2800 characters.\n\n)\n 285 \'timeout\': timeout,\n 286 }\n--> 288 run_tesseract(**kwargs)\n 289 filename = f"{kwargs[\'output_filename_base\']}{extsep}{extension}"\n\nFile ~\\anaconda3\\envs\\oi\\Lib\\site-packages\\pytesseract\\pytesseract.py:260, in run_tesseract(inpu...ext 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).'}
  1396.  
  1397. {'role': 'assistant', 'type': 'message', 'content': "It looks like there was an error in the code. I believe it's because Tesseract is not installed or not in the PATH. \n\nBefore we can continue, we need to install and configure Tesseract. \n\nLet me help you with that!\n\nLet's try to install Tesseract and configure it. \n\n"}
  1398.  
  1399. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\n!pip install pytesseract\n!pip install Pillow\n!pip install opencv-\n\nimport pytesseract\nimport pillow\nimport cv2\n\nprint("Tesseract installed!")\n'}
  1400.  
  1401. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': ''}
  1402.  
  1403. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': 'Requirement already satisfied: pytesseract in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (0.3.10)\nRequirement already satisfied: packaging>=21.3 in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (from pytesseract) (23.2)\nRequirement already satisfied: Pillow>=8.0.0 in c:\\users\\ivan\\anacond...ModuleNotFoundError Traceback (most recent call last)\nCell In[20], line 5\n 3 get_ipython().system(\'pip install opencv-\')\n 4 import pytesseract\n----> 5 import pillow\n 6 import cv2\n 7 print("Tesseract installed!")\n\nModuleNotFoundError: No module named \'pillow\''}
  1404.  
  1405. {'role': 'assistant', 'type': 'message', 'content': "It looks like we missed installing Pillow!\n\nLet's fix this. We'll install Pillow and then import it correctly. \n\nHere's the updated code:\n\n"}
  1406.  
  1407. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\n\n!pip install Pillow\n\nimport pytesseract\nimport pillow\nimport cv2\nprint("Tesseract installed!")\n'}
  1408.  
  1409. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': ''}
  1410.  
  1411. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': 'Requirement already satisfied: Pillow in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (10.2.0)\n---------------------------------------------------------------------------\nModuleNotFoundError Traceback (most recent call last)\nCell In[26], line 3\n 1 get_ipython().system(\'pip install Pillow\')\n 2 import pytesseract\n----> 3 import pillow\n 4 import cv2\n 5 print("Tesseract installed!")\n\nModuleNotFoundError: No module named \'pillow\''}
  1412.  
  1413. {'role': 'assistant', 'type': 'message', 'content': "Let's try to import Pillow correctly. \n\nHere's the updated code:\n\n"}
  1414.  
  1415. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\nfrom PIL import Image\n\nprint("Pillow imported!")\n\n'}
  1416.  
  1417. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': 'Pillow imported!\n'}
  1418.  
  1419. {'role': 'assistant', 'type': 'message', 'content': "You're back to the original goal!\n\nLet's get back to the task at hand. \n\nTo find out how many unread messages you have in WhatsApp, we need to get the number of messages in the WhatsApp chat and then count the ones that are unchecked.\n\nHere's the updated code:\n"}
  1420.  
  1421. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\n\nimport computer\n\n# Focus on the WhatsApp window\ncomputer.display.view()\ncomputer.mouse.move("WhatsApp")\ncomputer.mouse.click()\n\n# Count the number of unread messages\ncount = computer.clipboard.view().count(":))")\nprint(f"You have {count} unread messages in WhatsApp")\n'}
  1422.  
  1423. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': 'Output truncated. Showing the last 2800 characters.\n\n)\n 285 \'timeout\': timeout,\n 286 }\n--> 288 run_tesseract(**kwargs)\n 289 filename = f"{kwargs[\'output_filename_base\']}{extsep}{extension}"\n\nFile ~\\anaconda3\\envs\\oi\\Lib\\site-packages\\pytesseract\\pytesseract.py:260, in run_tesseract(inpu...ext 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).'}
  1424.  
  1425. {'role': 'assistant', 'type': 'message', 'content': "It looks like we have an issue with installation!\n\nLet's try installingpytesseract correctly.\n\nHere's the updated code:\n\n"}
  1426.  
  1427. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\n!pip install pytesseract\n!pip install pillow\nimport pytesseract\nfrom PIL import Image\nimport cv2\n\n# Rest of the code...\n'}
  1428.  
  1429. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': ''}
  1430.  
  1431. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': 'Requirement already satisfied: pytesseract in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (0.3.10)\nRequirement already satisfied: packaging>=21.3 in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (from pytesseract) (23.2)\nRequirement already satisfied: Pillow>=8.0.0 in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (from pytesseract) (10.2.0)\nRequirement already satisfied: pillow in c:\\users\\ivan\\anaconda3\\envs\\oi\\lib\\site-packages (10.2.0)\n'}
  1432.  
  1433. {'role': 'assistant', 'type': 'message', 'content': "It looks like we're all set!\n\nLet's run the code again and see what happens.\n\nHere's the updated code:\n\n"}
  1434.  
  1435. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\nimport pytesseract\nfrom PIL import Image\nimport cv2\nimport computer\n\n# Focus on the WhatsApp window\ncomputer.mouse.move("WhatsApp")\ncomputer.mouse.click()\n\n# Count the number of unread messages\ncount = computer.clipboard.view().count(":))")\nprint(f"You have {count} unread messages in WhatsApp")\n\n'}
  1436.  
  1437. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': "Output truncated. Showing the last 2800 characters.\n\n\n\nFile ~\\anaconda3\\envs\\oi\\Lib\\site-packages\\pytesseract\\pytesseract.py:260, in run_tesseract(input_filename, output_filename_base, extension, lang, config, nice, timeout)\n 259 else:\n--> 260 raise TesseractNotFoundError()\n 262 wi...ext 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)."}
  1438.  
  1439. {'role': 'assistant', 'type': 'message', 'content': "It seems like we've hit a roadblock!\n\nLet's try to install Tesseract and see if that solves the issue. Remember to follow the link provided in the error message for help installing Tesseract.\n\nHere's the updated code:\n\n"}
  1440.  
  1441. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\n!pip install tesseract-ocr\n\n'}
  1442.  
  1443. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': ''}
  1444.  
  1445. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': "Output truncated. Showing the last 2800 characters.\n\nor: subprocess-exited-with-error\n \n python setup.py bdist_wheel did not run successfully.\n exit code: 1\n \n [29 lines of output]\n C:\\Users\\ivan\\anaconda3\\envs\\oi\\Lib\\site-packages\\setuptools\\dist.py:498: SetuptoolsDeprecationWarning: Invalid ...4\\\\cl.exe' failed with exit code 2\n [end of output]\n \n note: This error originates from a subprocess, and is likely not a problem with pip.\n ERROR: Failed building wheel for tesseract-ocr\nERROR: Could not build wheels for tesseract-ocr, which is required to install pyproject.toml-based projects\n"}
  1446.  
  1447. {'role': 'assistant', 'type': 'message', 'content': "It looks like we've encountered an error when trying to install Tesseract-OCR. It seems like there was a problem building the wheel for the Tesseract-OCR package.\n\nDon't worry! We can try to troubleshoot this issue further. Let's first check if the package is already installed:\n\n\n\n"}
  1448.  
  1449. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\nimport os\nimport platform\n\n# Check if Tesseract-OCR is installed\nif not os.path.exists(os.path.join(os.environ[\'USERPROFILE\'], \'Anaconda3\', \'envs\', \'oi\', \'Lib\', \'site-packages\', \'pytesseract\')):\n print("Tesseract-OCR is not installed.")\n # Try to install Tesseract-OCR\n try:\n !pip in...r(e)}")\n # Check if installation was successful\n if not os.path.exists(os.path.join(os.environ[\'USERPROFILE\'], \'Anaconda3\', \'envs\', \'oi\', \'Lib\', \'site-packages\', \'pytesseract\')):\n print("Failed to install Tesseract-OCR.")\n else:\n print("Tesseract-OCR installed successfully.")\n'}
  1450.  
  1451. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': ''}
  1452.  
  1453. {'role': 'assistant', 'type': 'message', 'content': "Let's summarize what's happening on-screen.\n\n"}
  1454.  
  1455. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\n\n# Ensure we\'re in the right window\ncomputer.switch_desktop()\n\n# Search Google for "Tesseract OCR"\ncomputer.browser.search("Tesseract OCR")\n\n# Wait for a few seconds to load the results\nimport time\ntime.sleep(5)\n\n# Take a screenshot to verify the results are correct\nimport pytesseract\nfrom PIL import ImageGrab\n\nimg = ImageGrab.grab(bbox=(0, 0, 1920, 1080))\nimg.save("screenshot.png")\n'}
  1456.  
  1457. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': "---------------------------------------------------------------------------\nAttributeError Traceback (most recent call last)\nCell In[77], line 4\n 2 pass\n 3 print('##active_line2##')\n----> 4 computer.switch_desktop()\n 5 print('##active_line3##')\n 6 pass\n\nAttributeError: 'Computer' object has no attribute 'switch_desktop'"}
  1458.  
  1459. {'role': 'assistant', 'type': 'message', 'content': "Let's try to switch to a new active window.\n\nHere's a Python code that switches to the new active window:\n\n"}
  1460.  
  1461. {'role': 'assistant', 'type': 'code', 'format': 'python', 'content': '\nimport computer\n\ncomputer.keyboard.write("winkey+a") # Simulate pressing the Win key and \'a\' key together to activate the application menu\n'}
  1462.  
  1463. {'role': 'computer', 'type': 'console', 'format': 'output', 'content': ''}
  1464.  
  1465. Traceback (most recent call last):
  1466. File "<frozen runpy>", line 198, in _run_module_as_main
  1467. File "<frozen runpy>", line 88, in _run_code
  1468. File "C:\Users\ivan\anaconda3\envs\oi\Scripts\interpreter.exe\__main__.py", line 7, in <module>
  1469. File "C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\interpreter\terminal_interface\start_terminal_interface.py", line 437, in main
  1470. start_terminal_interface(interpreter)
  1471. File "C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\interpreter\terminal_interface\start_terminal_interface.py", line 415, in start_terminal_interface
  1472. interpreter.chat()
  1473. File "C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\interpreter\core\core.py", line 167, in chat
  1474. for _ in self._streaming_chat(message=message, display=display):
  1475. File "C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\interpreter\core\core.py", line 196, in _streaming_chat
  1476. yield from terminal_interface(self, message)
  1477. File "C:\Users\ivan\anaconda3\envs\oi\Lib\site-packages\interpreter\terminal_interface\terminal_interface.py", line 151, in terminal_interface
  1478. and "failsafeexception" in chunk["content"].lower()
  1479. ~~~~~^^^^^^^^^^^
  1480. KeyError: 'content'
  1481. [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
  1482. [IPKernelApp] WARNING | Parent appears to have exited, shutting down.
Add Comment
Please, Sign In to add comment