webarena icon indicating copy to clipboard operation
webarena copied to clipboard

Error running run.py `It looks like you are using Playwright Sync API inside the asyncio loop`

Open morganmcg1 opened this issue 10 months ago • 2 comments

Hey all! Getting started with webarena, and it holds a lot of promise!

I'm getting this error when running

python run.py --instruction_path agent/prompts/jsons/p_cot_id_actree_2s.json --test_start_idx 0 --test_end_idx 3 --model gpt-3.5-turbo --result_dir results

on just 2 examples: Error running run.py It looks like you are using Playwright Sync API inside the asyncio loop`

Any suggestions how I can fix it? Its odd because I can see that run.py isn't doing anything async, so its really puzzling why this error is being thrown...

**Full pip freeze here**

Pip freeze

aiobotocore @ file:///croot/aiobotocore_1682536655331/work aiofiles @ file:///croot/aiofiles_1683773582346/work aiohttp @ file:///croot/aiohttp_1670009560265/work aioitertools @ file:///tmp/build/80754af9/aioitertools_1607109665762/work aiolimiter==1.1.0 aiosignal @ file:///tmp/build/80754af9/aiosignal_1637843061372/work aiosqlite @ file:///croot/aiosqlite_1683773899903/work alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work annotated-types==0.6.0 anyio @ file:///tmp/build/80754af9/anyio_1644481695334/work/dist appdirs==1.4.4 argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work argon2-cffi-bindings @ file:///tmp/build/80754af9/argon2-cffi-bindings_1644553347904/work arrow @ file:///croot/arrow_1676588132104/work astroid @ file:///croot/astroid_1676904296642/work astropy @ file:///opt/conda/conda-bld/astropy_1657786094003/work asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work async-timeout @ file:///opt/conda/conda-bld/async-timeout_1664876359750/work atomicwrites==1.4.0 attrs @ file:///croot/attrs_1668696182826/work Automat @ file:///tmp/build/80754af9/automat_1600298431173/work autopep8 @ file:///opt/conda/conda-bld/autopep8_1650463822033/work Babel @ file:///croot/babel_1671781930836/work backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work bcrypt @ file:///tmp/abs_6fpe92qzzo/croots/recipe/bcrypt_1659554336150/work beartype==0.12.0 beautifulsoup4 @ file:///croot/beautifulsoup4-split_1681493039619/work binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work black @ file:///croot/black_1680737249031/work bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work blinker==1.7.0 bokeh @ file:///croot/bokeh_1690546085683/work botocore @ file:///croot/botocore_1682527998176/work Bottleneck @ file:///opt/conda/conda-bld/bottleneck_1657175564434/work brotlipy==0.7.0 certifi @ file:///croot/certifi_1690232220950/work/certifi cffi @ file:///croot/cffi_1670423208954/work chardet @ file:///home/builder/ci_310/chardet_1640804867535/work

cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work cytoolz @ file:///croot/cytoolz_1667465931118/work daal4py==2023.1.1 dask @ file:///croot/dask-core_1686782904390/work datasets @ file:///croot/datasets_1684482929171/work datashader @ file:///croot/datashader_1689587631676/work datashape==0.5.4 debugpy @ file:///croot/debugpy_1690905042057/work decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work dill @ file:///croot/dill_1667919592856/work distributed @ file:///croot/distributed_1686866039819/work distro==1.9.0 docstring-to-markdown @ file:///croot/docstring-to-markdown_1673447639232/work docutils @ file:///opt/conda/conda-bld/docutils_1657175430858/work entrypoints @ file:///tmp/build/80754af9/entrypoints_1649908313000/work et-xmlfile==1.1.0 evaluate==0.4.1 exceptiongroup @ file:///croot/exceptiongroup_1668714342571/work executing @ file:///opt/conda/conda-bld/executing_1646925071911/work Farama-Notifications==0.0.4 fastjsonschema @ file:///opt/conda/conda-bld/python-fastjsonschema_1661371079312/work filelock @ file:///croot/filelock_1672387128942/work flake8 @ file:///croot/flake8_1674581792275/work Flask==3.0.2 fonttools==4.25.0 frozenlist @ file:///croot/frozenlist_1670004507010/work fsspec @ file:///croot/fsspec_1682525977151/work gensim @ file:///croot/gensim_1674852436045/work gmpy2 @ file:///tmp/build/80754af9/gmpy2_1645455533097/work greenlet @ file:///croot/greenlet_1670513226095/work gymnasium==0.29.1 h11==0.14.0 h5py @ file:///tmp/abs_4aewd3wzey/croots/recipe/h5py_1659091371897/work HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work holoviews @ file:///croot/holoviews_1690477566927/work httpcore==1.0.5 httpx==0.27.0 huggingface-hub @ file:///croot/huggingface_hub_1686693679113/work hvplot @ file:///croot/hvplot_1685998166135/work hyperlink @ file:///tmp/build/80754af9/hyperlink_1610130746837/work idna @ file:///croot/idna_1666125576474/work imagecodecs @ file:///croot/imagecodecs_1677576717595/work imageio @ file:///croot/imageio_1687264943895/work imagesize @ file:///opt/conda/conda-bld/imagesize_1657179498843/work imbalanced-learn @ file:///croot/imbalanced-learn_1685020884354/work importlib-metadata @ file:///croot/importlib-metadata_1678997070253/work incremental @ file:///tmp/build/80754af9/incremental_1636629750599/work inflection==0.5.1 iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work intake @ file:///croot/intake_1678787599595/work intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work ipykernel @ file:///croot/ipykernel_1671488378391/work ipython @ file:///croot/ipython_1680701871216/work ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work ipywidgets @ file:///croot/ipywidgets_1679394798311/work isort @ file:///tmp/build/80754af9/isort_1628603791788/work itemadapter @ file:///tmp/build/80754af9/itemadapter_1626442940632/work itemloaders @ file:///opt/conda/conda-bld/itemloaders_1646805235997/work itsdangerous==2.1.2 jaraco.classes @ file:///tmp/build/80754af9/jaraco.classes_1620983179379/work jedi @ file:///tmp/build/80754af9/jedi_1644315229345/work jeepney @ file:///tmp/build/80754af9/jeepney_1627537048313/work jellyfish @ file:///tmp/build/80754af9/jellyfish_1647944422765/work Jinja2 @ file:///croot/jinja2_1666908132255/work jinja2-time @ file:///opt/conda/conda-bld/jinja2-time_1649251842261/work jmespath @ file:///Users/ktietz/demo/mc3/conda-bld/jmespath_1630583964805/work joblib @ file:///croot/joblib_1685113087166/work json5 @ file:///tmp/build/80754af9/json5_1624432770122/work jsonschema @ file:///croot/jsonschema_1676558650973/work jupyter @ file:///tmp/abs_33h4eoipez/croots/recipe/jupyter_1659349046347/work jupyter-console @ file:///croot/jupyter_console_1679999630278/work jupyter-events @ file:///croot/jupyter_events_1684268042853/work jupyter-server @ file:///croot/jupyter_server_1671707632269/work jupyter-ydoc @ file:///croot/jupyter_ydoc_1683747223142/work jupyter_client @ file:///croot/jupyter_client_1676329080601/work jupyter_core @ file:///croot/jupyter_core_1679906564508/work jupyter_server_fileid @ file:///croot/jupyter_server_fileid_1684273577568/work jupyter_server_ydoc @ file:///croot/jupyter_server_ydoc_1686767404829/work jupyterlab @ file:///croot/jupyterlab_1686179668131/work jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-widgets @ file:///croot/jupyterlab_widgets_1679055282532/work jupyterlab_server @ file:///croot/jupyterlab_server_1680792501448/work keyring @ file:///croot/keyring_1678999217139/work kiwisolver @ file:///croot/kiwisolver_1672387140495/work lazy-object-proxy @ file:///home/builder/ci_310/lazy-object-proxy_1640791307593/work lazy_loader @ file:///croot/lazy_loader_1687264084094/work linkify-it-py @ file:///opt/conda/conda-bld/linkify-it-py_1659783361596/work llvmlite @ file:///croot/llvmlite_1683555126642/work lmdb @ file:///croot/python-lmdb_1682522346377/work locket @ file:///opt/conda/conda-bld/locket_1652903118915/work lxml @ file:///opt/conda/conda-bld/lxml_1657545139709/work lz4 @ file:///croot/lz4_1686057876374/work Markdown @ file:///croot/markdown_1671541909495/work markdown-it-py @ file:///croot/markdown-it-py_1684279902645/work MarkupSafe @ file:///opt/conda/conda-bld/markupsafe_1654597864307/work matplotlib @ file:///croot/matplotlib-suite_1679593461707/work matplotlib-inline @ file:///opt/conda/conda-bld/matplotlib-inline_1662014470464/work mccabe @ file:///opt/conda/conda-bld/mccabe_1644221741721/work mdit-py-plugins @ file:///opt/conda/conda-bld/mdit-py-plugins_1659721247557/work mdurl @ file:///opt/conda/conda-bld/mdurl_1659716024347/work mistune @ file:///home/builder/ci_310/mistune_1640791641754/work mkl-fft==1.3.6 mkl-random @ file:///work/mkl/mkl_random_1682950433854/work mkl-service==2.4.0 more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work mpmath @ file:///croot/mpmath_1690848262763/work msgpack @ file:///opt/conda/conda-bld/msgpack-python_1652362659880/work multidict @ file:///croot/multidict_1665674239670/work multipledispatch @ file:///home/builder/ci_310/multipledispatch_1640791758119/work multiprocess @ file:///croot/multiprocess_1668006441451/work munkres==1.1.4 mypy-extensions==0.4.3 nbclassic @ file:///croot/nbclassic_1681756170010/work nbclient @ file:///tmp/build/80754af9/nbclient_1650290238894/work nbconvert @ file:///croot/nbconvert_1668450669124/work nbformat @ file:///croot/nbformat_1670352325207/work nest-asyncio @ file:///croot/nest-asyncio_1672387112409/work networkx @ file:///croot/networkx_1690561992265/work nltk @ file:///croot/nltk_1688114146592/work notebook @ file:///croot/notebook_1690984815942/work notebook_shim @ file:///croot/notebook-shim_1668160579331/work numba @ file:///croot/numba_1684245461770/work numexpr @ file:///croot/numexpr_1683221822650/work numpy @ file:///work/mkl/numpy_and_numpy_base_1682953417311/work numpydoc @ file:///croot/numpydoc_1668085905352/work openai==0.27.0 openpyxl==3.0.10 packaging @ file:///croot/packaging_1678965309396/work pandas==1.5.3 pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work panel @ file:///croot/panel_1690822207338/work param @ file:///croot/param_1684915322283/work parsel @ file:///tmp/build/80754af9/parsel_1646739959912/work parso @ file:///opt/conda/conda-bld/parso_1641458642106/work partd @ file:///opt/conda/conda-bld/partd_1647245470509/work pathspec @ file:///croot/pathspec_1674681560568/work patsy==0.5.3 pep8==1.7.1 pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work pillow==10.3.0 platformdirs @ file:///opt/conda/conda-bld/platformdirs_1662711380096/work playwright==1.32.1 plotly @ file:///tmp/abs_7afcdfad-dbbb-49d2-adea-186abf525c45jbnd8p95/croots/recipe/plotly_1658160053621/work pluggy==1.4.0 ply==3.11 pooch @ file:///tmp/build/80754af9/pooch_1623324770023/work poyo @ file:///tmp/build/80754af9/poyo_1617751526755/work prometheus-client @ file:///tmp/abs_d3zeliano1/croots/recipe/prometheus_client_1659455100375/work prompt-toolkit @ file:///croot/prompt-toolkit_1672387306916/work Protego @ file:///tmp/build/80754af9/protego_1598657180827/work psutil @ file:///opt/conda/conda-bld/psutil_1656431268089/work ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work py-cpuinfo @ file:///Users/ktietz/demo/mc3/conda-bld/py-cpuinfo_1629480366017/work pyarrow==11.0.0 pyasn1 @ file:///Users/ktietz/demo/mc3/conda-bld/pyasn1_1629708007385/work pyasn1-modules==0.2.8 pycodestyle @ file:///croot/pycodestyle_1674267221883/work pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work pyct @ file:///croot/pyct_1675441480074/work pycurl==7.45.2 pydantic==2.6.4 pydantic_core==2.16.3 PyDispatcher==2.0.5 pydocstyle @ file:///croot/pydocstyle_1675221668445/work pyee==9.0.4 pyerfa @ file:///home/builder/ci_310/pyerfa_1640793199719/work pyflakes @ file:///croot/pyflakes_1674165128613/work Pygments @ file:///croot/pygments_1684279966437/work pylint @ file:///croot/pylint_1676919896363/work pylint-venv @ file:///croot/pylint-venv_1673990127282/work pyls-spyder==0.4.0 pyodbc @ file:///tmp/abs_d365zrcsdp/croots/recipe/pyodbc_1659513794382/work pyOpenSSL @ file:///croot/pyopenssl_1690223430423/work pyparsing @ file:///opt/conda/conda-bld/pyparsing_1661452539315/work PyQt5-sip==12.11.0 pyrsistent @ file:///home/builder/ci_310/pyrsistent_1640807196327/work PySocks @ file:///home/builder/ci_310/pysocks_1640793678128/work pytest==8.1.1 pytest-asyncio==0.23.6 python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work python-json-logger @ file:///croot/python-json-logger_1683823803357/work python-lsp-black @ file:///opt/conda/conda-bld/python-lsp-black_1661852031497/work python-lsp-jsonrpc==1.0.0 python-lsp-server @ file:///croot/python-lsp-server_1681930392028/work python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work python-snappy @ file:///croot/python-snappy_1670943913523/work pytoolconfig @ file:///croot/pytoolconfig_1676315026871/work pytz @ file:///croot/pytz_1671697431263/work pyviz-comms @ file:///croot/pyviz_comms_1685030693726/work PyWavelets @ file:///croot/pywavelets_1670425177960/work pyxdg @ file:///tmp/build/80754af9/pyxdg_1603822279816/work PyYAML @ file:///croot/pyyaml_1670514731622/work pyzmq @ file:///opt/conda/conda-bld/pyzmq_1657724186960/work QDarkStyle @ file:///tmp/build/80754af9/qdarkstyle_1617386714626/work qstylizer @ file:///croot/qstylizer_1674008522553/work/dist/qstylizer-0.2.2-py2.py3-none-any.whl QtAwesome @ file:///croot/qtawesome_1674008680358/work qtconsole @ file:///croot/qtconsole_1681394213385/work QtPy @ file:///opt/conda/conda-bld/qtpy_1662014892439/work queuelib==1.5.0 regex @ file:///tmp/abs_41f5bce5-0a2e-45aa-b231-1fd2fbd57753gfpe6sjm/croots/recipe/regex_1658257178822/work requests @ file:///croot/requests_1690400202158/work requests-file @ file:///Users/ktietz/demo/mc3/conda-bld/requests-file_1629455781986/work responses @ file:///tmp/build/80754af9/responses_1619800270522/work rfc3339-validator @ file:///croot/rfc3339-validator_1683077044675/work rfc3986-validator @ file:///croot/rfc3986-validator_1683058983515/work rope @ file:///croot/rope_1676675015455/work Rtree @ file:///croot/rtree_1675157851263/work s3fs @ file:///croot/s3fs_1682551471189/work sacremoses @ file:///tmp/build/80754af9/sacremoses_1633107328213/work safetensors==0.4.2 scikit-image @ file:///croot/scikit-image_1682528309703/work scikit-learn @ file:///croot/scikit-learn_1690978916802/work scikit-learn-intelex==20230426.111436 scipy==1.10.1 Scrapy @ file:///croot/scrapy_1677738182270/work seaborn @ file:///croot/seaborn_1673479180098/work SecretStorage @ file:///croot/secretstorage_1678709481048/work Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work service-identity @ file:///Users/ktietz/demo/mc3/conda-bld/service_identity_1629460757137/work sip @ file:///tmp/abs_44cd77b_pu/croots/recipe/sip_1659012365470/work six @ file:///tmp/build/80754af9/six_1644875935023/work smart-open @ file:///opt/conda/conda-bld/smart_open_1651563547610/work sniffio @ file:///home/builder/ci_310/sniffio_1640794799774/work snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1637937080595/work sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work soupsieve @ file:///croot/soupsieve_1680518478486/work Sphinx @ file:///opt/conda/conda-bld/sphinx_1657784123546/work sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work sphinxcontrib-htmlhelp @ file:///tmp/build/80754af9/sphinxcontrib-htmlhelp_1623945626792/work sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work sphinxcontrib-serializinghtml @ file:///tmp/build/80754af9/sphinxcontrib-serializinghtml_1624451540180/work spyder @ file:///croot/spyder_1681934064788/work spyder-kernels @ file:///croot/spyder-kernels_1681307264370/work SQLAlchemy @ file:///tmp/abs_18b3238f-9c23-4182-a392-63af30a93c1er8j_yw60/croots/recipe/sqlalchemy_1657867856580/work stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work statsmodels @ file:///croot/statsmodels_1689937266057/work sympy @ file:///croot/sympy_1668202399572/work tables @ file:///croot/pytables_1685123207389/work tabulate @ file:///opt/conda/conda-bld/tabulate_1657784105888/work TBB==0.2 tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work tenacity @ file:///croot/tenacity_1682972284834/work terminado @ file:///croot/terminado_1671751832461/work text-generation==0.7.0 text-unidecode @ file:///Users/ktietz/demo/mc3/conda-bld/text-unidecode_1629401354553/work textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work tifffile @ file:///tmp/build/80754af9/tifffile_1627275862826/work tiktoken==0.6.0 tinycss2 @ file:///croot/tinycss2_1668168815555/work tldextract @ file:///opt/conda/conda-bld/tldextract_1646638314385/work tokenizers @ file:///croot/tokenizers_1687191909486/work toml @ file:///tmp/build/80754af9/toml_1616166611790/work tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work tomlkit @ file:///tmp/abs_56_0lnnq5x/croots/recipe/tomlkit_1658946880479/work toolz @ file:///croot/toolz_1667464077321/work torch @ file:///croot/pytorch_1686931851744/work tornado @ file:///croot/tornado_1690848263220/work tqdm @ file:///croot/tqdm_1679561862951/work traitlets @ file:///croot/traitlets_1671143879854/work transformers==4.33.2 Twisted @ file:///croot/twisted_1683796889247/work types-tqdm==4.66.0.20240106 typing_extensions @ file:///croot/typing_extensions_1690297465030/work uc-micro-py @ file:///opt/conda/conda-bld/uc-micro-py_1659769408368/work ujson @ file:///opt/conda/conda-bld/ujson_1657544923770/work Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work urllib3 @ file:///croot/urllib3_1686163155763/work w3lib @ file:///Users/ktietz/demo/mc3/conda-bld/w3lib_1629359764703/work watchdog @ file:///home/builder/ci_310/watchdog_1640811339391/work wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work -e git+https://github.com/web-arena-x/webarena.git@0056d34059467d27c190f5f081d066ba93879098#egg=webarena webencodings==0.5.1 websocket-client @ file:///home/builder/ci_310/websocket-client_1640795866898/work Werkzeug==3.0.1 whatthepatch @ file:///opt/conda/conda-bld/whatthepatch_1661795988879/work widgetsnbextension @ file:///croot/widgetsnbextension_1679313860248/work wrapt @ file:///tmp/abs_c335821b-6e43-4504-9816-b1a52d3d3e1eel6uae8l/croots/recipe/wrapt_1657814400492/work wurlitzer @ file:///home/builder/ci_310/wurlitzer_1640796026694/work xarray @ file:///croot/xarray_1689041471350/work xxhash @ file:///croot/python-xxhash_1667919521615/work xyzservices @ file:///croot/xyzservices_1675159059961/work y-py @ file:///croot/y-py_1683555143488/work yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work yarl @ file:///opt/conda/conda-bld/yarl_1661437085904/work ypy-websocket @ file:///croot/ypy-websocket_1684171737040/work zict @ file:///croot/zict_1682698729376/work zipp @ file:///croot/zipp_1672387121353/work zope.interface @ file:///home/builder/ci_310/zope.interface_1640811449297/work

Full trace

[Config file]: /tmp/tmpatyghmhv/1.json
[Unhandled Error] Error('It looks like you are using Playwright Sync API inside the asyncio loop.\nPlease use the Async API instead.')
Traceback (most recent call last):
  File "/home/ubuntu/webarena/run.py", line 282, in test
    obs, info = env.reset(options={"config_file": config_file})
  File "<@beartype(browser_env.envs.ScriptBrowserEnv.reset) at 0x7fdca45c4f70>", line 51, in reset
  File "/home/ubuntu/webarena/browser_env/envs.py", line 203, in reset
    self.setup(config_file=config_file)
  File "<@beartype(browser_env.envs.ScriptBrowserEnv.setup) at 0x7fdca45c4ca0>", line 36, in setup
  File "/home/ubuntu/webarena/browser_env/envs.py", line 127, in setup
    self.playwright = self.context_manager.__enter__()
  File "/home/ubuntu/miniconda3/envs/webarena/lib/python3.10/site-packages/playwright/sync_api/_context_manager.py", line 47, in __enter__
    raise Error(
playwright._impl._api_types.Error: It looks like you are using Playwright Sync API inside the asyncio loop.
Please use the Async API instead.
[Config file]: /tmp/tmpsqs125np/2.json
[Unhandled Error] Error('It looks like you are using Playwright Sync API inside the asyncio loop.\nPlease use the Async API instead.')
Traceback (most recent call last):
  File "/home/ubuntu/webarena/run.py", line 282, in test
    obs, info = env.reset(options={"config_file": config_file})
  File "<@beartype(browser_env.envs.ScriptBrowserEnv.reset) at 0x7fdca45c4f70>", line 51, in reset
  File "/home/ubuntu/webarena/browser_env/envs.py", line 203, in reset
    self.setup(config_file=config_file)
  File "<@beartype(browser_env.envs.ScriptBrowserEnv.setup) at 0x7fdca45c4ca0>", line 36, in setup
  File "/home/ubuntu/webarena/browser_env/envs.py", line 127, in setup
    self.playwright = self.context_manager.__enter__()
  File "/home/ubuntu/miniconda3/envs/webarena/lib/python3.10/site-packages/playwright/sync_api/_context_manager.py", line 47, in __enter__
    raise Error(
playwright._impl._api_types.Error: It looks like you are using Playwright Sync API inside the asyncio loop.
Please use the Async API instead.

morganmcg1 avatar Apr 01 '24 20:04 morganmcg1

Sometimes this happens because the previous program did not exit completely. Was the first example successful? Do you consistently get the same error?

shuyanzhou avatar Apr 03 '24 01:04 shuyanzhou

try playwright install first

frankxu2004 avatar Apr 15 '24 05:04 frankxu2004