devika icon indicating copy to clipboard operation
devika copied to clipboard

error when browser tries to reach a web based pdf file.

Open Fratua opened this issue 11 months ago • 5 comments

Exception in thread Thread-274 (): Traceback (most recent call last): File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Python312\Lib\threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "C:\AI\New folder\devika\devika\devika.py", line 49, in target=lambda: Agent(base_model=base_model).execute(prompt, project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\devika\src\agents\agent.py", line 333, in execute search_results = self.search_queries(queries, project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\devika\src\agents\agent.py", line 89, in search_queries browser.go_to(link) File "C:\AI\New folder\devika\devika\src\browser\browser.py", line 21, in go_to self.page.goto(url) File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright\sync_api_generated.py", line 8641, in goto self._sync( File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_sync_base.py", line 113, in _sync return task.result() ^^^^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_page.py", line 500, in goto return await self._main_frame.goto(**locals_to_params(locals())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_frame.py", line 145, in goto await self._channel.send("goto", locals_to_params(locals())) File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_connection.py", line 59, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_connection.py", line 509, in wrap_api_call return await cb() ^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._errors.Error: net::ERR_ABORTED at https://openaccess.thecvf.com/content/CVPR2023/papers/Wang_Cut_and_Learn_for_Unsupervised_Object_Detection_and_Instance_Segmentation_CVPR_2023_paper.pdf

Fratua avatar Mar 23 '24 20:03 Fratua

Exception in thread Thread-1918 (): Traceback (most recent call last): File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Python312\Lib\threading.py", line 1010, in run self._target(*self._args, **self._kwargs) File "C:\AI\New folder\devika\devika\devika.py", line 49, in target=lambda: Agent(base_model=base_model).execute(prompt, project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\devika\src\agents\agent.py", line 333, in execute search_results = self.search_queries(queries, project_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\devika\src\agents\agent.py", line 89, in search_queries browser.go_to(link) File "C:\AI\New folder\devika\devika\src\browser\browser.py", line 21, in go_to self.page.goto(url) File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright\sync_api_generated.py", line 8641, in goto self._sync( File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_sync_base.py", line 113, in _sync return task.result() ^^^^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_page.py", line 500, in goto return await self._main_frame.goto(**locals_to_params(locals())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_frame.py", line 145, in goto await self._channel.send("goto", locals_to_params(locals())) File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_connection.py", line 59, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_connection.py", line 509, in wrap_api_call return await cb() ^^^^^^^^^^ File "C:\AI\New folder\devika\myenv\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._errors.Error: net::ERR_ABORTED at http://vision.stanford.edu/teaching/cs231n/slides/2021/lecture_12.pdf

Fratua avatar Mar 23 '24 20:03 Fratua

can you try with latest version??

ARajgor avatar Apr 06 '24 08:04 ARajgor

Will test shortly and close if fixed, thank you

Fratua avatar Apr 06 '24 11:04 Fratua

was able to replicate same issue with latest version

Fratua avatar Apr 06 '24 17:04 Fratua

I get a similar error on fresh install: playwright._impl._errors.Error: Page.goto: net::ERR_ABORTED at https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf

Summary: This plan covers compiling, assembling, linking and running a RISC-V assembly language program on your local system using the provided instructions as reference. You may need to adjust the steps based on your specific tools, compiler flags, and operating system. A key consideration is understanding the differences in syscalls across various RISC-V environments, including Milk VM DUO. 

24.04.19 12:01:52: root: INFO   : SOCKET agent-state MESSAGE: [{'internal_monologue': None, 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 842, 'timestamp': '2024-04-19 12:01:24'}]
24.04.19 12:01:52: root: INFO   : SOCKET server-message MESSAGE: {'messages': {'from_devika': True, 'message': 'I\'m going to create a plan to write a "Hello, World!" program tailored for the RISC-V architecture using the Milk VM DUO environment.', 'timestamp': '2024-04-19 12:01:52'}}
24.04.19 12:01:52: root: INFO   : SOCKET server-message MESSAGE: {'messages': {'from_devika': True, 'message': '{\n    "1": "Familiarize yourself with the RISC-V instruction set and Milk VM DUO environment by visiting official documentation or trusted resources.",\n    "2": "Install the required tools (if necessary) to compile, assemble, and run a RISC-V program on your local system.",\n    "3": "Create a new text file containing the assembly language code that prints \\"Hello, World!\\" using RISC-V instructions. Here is an example: ``` .section .data msg:    .ascii \\"Hello, World!\\\\n\\" msg_len = . - msg  .section .text .globl _start _start: la a0, msg       # Load the address of the message into register a0. li a7, 64        # Set syscall code to \\"print string\\". ecall            # Call kernel function with arguments in registers a0-a3.  li a7, 10        # Set syscall code to \\"exit\\". ecall            # Terminate the program. ```",\n    "4": "Compile and assemble the assembly language file into an object file using `riscv64-unknown-elf-as`.",\n    "5": "Link the object file with the RISC-V C library to produce an executable file using `riscv64-unknown-elf-ld`.",\n    "6": "Run the \\"Hello, World!\\" program in Milk VM DUO environment using QEMU or other supported platforms. "\n}', 'timestamp': '2024-04-19 12:01:52'}}

context_keywords ::  ['print', 'risc', 'language', 'assembly', 'hello'] 

24.04.19 12:01:53: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 2020}
Model: mixtral:latest, Enum: OLLAMA
24.04.19 12:01:56: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 1547}

internal_monologue ::  Alright, I need to start by learning the RISC-V instruction set and getting familiar with the Milk VM DUO environment. Once I have that down, I can install any necessary tools and create my 'Hello, World!' assembly language program. 

24.04.19 12:01:56: root: INFO   : SOCKET agent-state MESSAGE: [{'internal_monologue': None, 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 1489, 'timestamp': '2024-04-19 12:01:24'}, {'internal_monologue': "Alright, I need to start by learning the RISC-V instruction set and getting familiar with the Milk VM DUO environment. Once I have that down, I can install any necessary tools and create my 'Hello, World!' assembly language program.", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 0, 'timestamp': '2024-04-19 12:01:56'}]
24.04.19 12:01:56: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 2092}
Model: mixtral:latest, Enum: OLLAMA
24.04.19 12:02:05: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 1532}
Invalid response from the model, trying again...
24.04.19 12:02:05: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 3381}
Model: mixtral:latest, Enum: OLLAMA
24.04.19 12:02:11: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 2859}
Invalid response from the model, trying again...
24.04.19 12:02:11: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 4689}
Model: mixtral:latest, Enum: OLLAMA
24.04.19 12:02:11: root: INFO   : SOCKET tokens MESSAGE: {'token_usage': 3719}

research ::  {'queries': ['RISC-V instruction set architecture documentation', 'Milk VM DUO environment installation and setup guide'], 'ask_user': ''} 

24.04.19 12:02:11: root: INFO   : SOCKET server-message MESSAGE: {'messages': {'from_devika': True, 'message': 'I am browsing the web to research the following queries: RISC-V instruction set architecture documentation, Milk VM DUO environment installation and setup guide.\n If I need anything, I will make sure to ask you.', 'timestamp': '2024-04-19 12:02:11'}}
24.04.19 12:02:11: root: INFO   : SOCKET agent-state MESSAGE: [{'internal_monologue': None, 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 1489, 'timestamp': '2024-04-19 12:01:24'}, {'internal_monologue': "Alright, I need to start by learning the RISC-V instruction set and getting familiar with the Milk VM DUO environment. Once I have that down, I can install any necessary tools and create my 'Hello, World!' assembly language program.", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 3681, 'timestamp': '2024-04-19 12:01:56'}]
24.04.19 12:02:12: root: INFO   : 
Search Engine :: 

Link ::  https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf 

Exception in thread Thread-3 (<lambda>):
Traceback (most recent call last):
  File "/home/user/miniconda3/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/home/user/miniconda3/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/projects/devika/devika.py", line 94, in <lambda>
    thread = Thread(target=lambda: agent.execute(message, project_name))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/projects/devika/src/agents/agent.py", line 346, in execute
    search_results = self.search_queries(queries, project_name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/projects/devika/src/agents/agent.py", line 110, in search_queries
    browser, raw, data = loop.run_until_complete(self.open_page(project_name, link))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/user/projects/devika/src/agents/agent.py", line 72, in open_page
    await browser.go_to(url)
  File "/home/user/projects/devika/src/browser/browser.py", line 32, in go_to
    await self.page.goto(url, timeout=20000)
  File "/home/user/projects/devika/venv/lib/python3.11/site-packages/playwright/async_api/_generated.py", line 8638, in goto
    await self._impl_obj.goto(
  File "/home/user/projects/devika/venv/lib/python3.11/site-packages/playwright/_impl/_page.py", line 500, in goto
    return await self._main_frame.goto(**locals_to_params(locals()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/projects/devika/venv/lib/python3.11/site-packages/playwright/_impl/_frame.py", line 145, in goto
    await self._channel.send("goto", locals_to_params(locals()))
  File "/home/user/projects/devika/venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 59, in send
    return await self._connection.wrap_api_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/projects/devika/venv/lib/python3.11/site-packages/playwright/_impl/_connection.py", line 513, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: Page.goto: net::ERR_ABORTED at https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf
Call log:
navigating to "https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf", waiting until "load"

BarfingLemurs avatar Apr 19 '24 16:04 BarfingLemurs