Skip to content

Existence of "Timed Out" Sessions break list_sessions() #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

benkaufman1757
Copy link
Contributor

I've had some BrowserBase sessions enter a "Timed Out" state and the python-sdk doesn't seem to recognize it
Screenshot 2024-08-13 at 10 00 56 PM

This is the code I used to recreate the error

from browserbase import Browserbase
browserbase = Browserbase()
browserbase.list_sessions()

Traceback

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/benkaufman/repositories/browserstuff/bbyolo/.venv/lib/python3.11/site-packages/browserbase/__init__.py", line 138, in list_sessions
    return [Session(**item) for item in data]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/benkaufman/repositories/browserstuff/bbyolo/.venv/lib/python3.11/site-packages/browserbase/__init__.py", line 138, in <listcomp>
    return [Session(**item) for item in data]
            ^^^^^^^^^^^^^^^
  File "/Users/benkaufman/repositories/browserstuff/bbyolo/.venv/lib/python3.11/site-packages/pydantic/main.py", line 193, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Session
status
  Input should be 'NEW', 'CREATED', 'ERROR', 'RUNNING', 'REQUEST_RELEASE', 'RELEASING' or 'COMPLETED' [type=literal_error, input_value='TIMED_OUT', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/literal_error

Most recent timed out session in my account has the id: 54d54ab4-3118-44ac-997f-a1e7264ae504 which I feel comfortable posting here but lmk if I shouldn't post it and I'll take it down.

@kamath kamath merged commit 65e5ed2 into browserbase:main Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants