Error when trying to run Seamless Server on WSL2

#12
by lokii - opened

I am trying to run the seamless_server according to the seamless-streaming readme. I am using WSL2 and didn't have any install errors that I could find, and I am running in a conda environment using python 3.11.5.

When I try to run the final command to run the server in either dev or prod mode, I get a similar error:

(seamless) root@PI-Desktop:/mnt/c/Users/eriks/linux/seamless_communication/seamless-streaming/seamless_server# uvicorn app_pubsub:app --reload --host localhost
INFO:     Will watch for changes in these directories: ['/mnt/c/Users/eriks/linux/seamless_communication/seamless-streaming/seamless_server']
INFO:     Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [833] using WatchFiles
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/requests/compat.py", line 11, in <module>
    import chardet
ModuleNotFoundError: No module named 'chardet'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/miniconda3/envs/seamless/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/root/miniconda3/envs/seamless/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
    target(sockets=sockets)
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/uvicorn/server.py", line 61, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/uvicorn/server.py", line 68, in serve
    config.load()
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/uvicorn/config.py", line 467, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/uvicorn/importer.py", line 21, in import_from_string    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/mnt/c/Users/eriks/linux/seamless_communication/seamless-streaming/seamless_server/app_pubsub.py", line 21, in <module>
    from src.simuleval_agent_directory import NoAvailableAgentException
  File "/mnt/c/Users/eriks/linux/seamless_communication/seamless-streaming/seamless_server/src/simuleval_agent_directory.py", line 5, in <module>
    from src.simuleval_transcoder import SimulevalTranscoder
  File "/mnt/c/Users/eriks/linux/seamless_communication/seamless-streaming/seamless_server/src/simuleval_transcoder.py", line 1, in <module>
    from simuleval.utils.agent import build_system_from_dir
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/simuleval/utils/__init__.py", line 7, in <module>
    from .agent import build_system_from_dir, EVALUATION_SYSTEM_LIST  # noqa F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/simuleval/utils/agent.py", line 17, in <module>
    from simuleval import options
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/simuleval/options.py", line 14, in <module>
    from simuleval.data.dataloader import (
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/simuleval/data/__init__.py", line 1, in <module>
    from .dataloader import build_dataloader  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/simuleval/data/dataloader/__init__.py", line 20, in <module>
    from .s2t_dataloader import SpeechToTextDataloader  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/simuleval/data/dataloader/s2t_dataloader.py", line 16, in <module>
    import yt_dlp as youtube_dl
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/yt_dlp/__init__.py", line 19, in <module>
    from .cookies import SUPPORTED_BROWSERS, SUPPORTED_KEYRINGS
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/yt_dlp/cookies.py", line 21, in <module>
    from .aes import (
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/yt_dlp/aes.py", line 5, in <module>
    from .dependencies import Cryptodome
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/yt_dlp/dependencies/__init__.py", line 67, in <module>
    import requests
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/requests/__init__.py", line 45, in <module>
    from .exceptions import RequestsDependencyWarning
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/requests/exceptions.py", line 9, in <module>
    from .compat import JSONDecodeError as CompatJSONDecodeError
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/requests/compat.py", line 13, in <module>
    import charset_normalizer as chardet
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/charset_normalizer/__init__.py", line 23, in <module>
    from charset_normalizer.api import from_fp, from_path, from_bytes, normalize
  File "/root/miniconda3/envs/seamless/lib/python3.11/site-packages/charset_normalizer/api.py", line 10, in <module>
    from charset_normalizer.md import mess_ratio
AttributeError: partially initialized module 'charset_normalizer' has no attribute 'md__mypyc' (most likely due to a circular import)
^CINFO:     Stopping reloader process [833]

Any suggestions to get past this error? chardet is installed and runs just fine in my conda environment.

lokii changed discussion status to closed

Sign up or log in to comment