Skip to content

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

Merged
kamath merged 1 commit into
browserbase:mainfrom
benkaufman1757:enum-issue
Sep 17, 2024
Merged

Existence of "Timed Out" Sessions break list_sessions()#2
kamath merged 1 commit into
browserbase:mainfrom
benkaufman1757:enum-issue

Conversation

@benkaufman1757

Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants