Eugeny / tabby-connection-gateway

Connection gateway for Tabby Web
https://tabby.sh
MIT License
116 stars 24 forks source link

Docker start error #19

Open chenzhiguo opened 1 year ago

chenzhiguo commented 1 year ago

Use the latest(now is 2023-10-29) version of TCG, there is error logs when start container.

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/app/tabby_connection_gateway/cli.py", line 7, in <module>
    from .admin_server import AdminServer
  File "/app/tabby_connection_gateway/admin_server.py", line 2, in <module>
    from tabby_connection_gateway.gateway_server import GatewayServer
  File "/app/tabby_connection_gateway/gateway_server.py", line 5, in <module>
    import websockets
  File "/usr/local/lib/python3.7/site-packages/websockets-12.0-py3.7.egg/websockets/__init__.py", line 6, in <module>
    from .version import version as __version__  # noqa: F401
  File "/usr/local/lib/python3.7/site-packages/websockets-12.0-py3.7.egg/websockets/version.py", line 3, in <module>
    import importlib.metadata
ModuleNotFoundError: No module named 'importlib.metadata'
fixxolas commented 12 months ago

+1

alexdelprete commented 10 months ago

Confirmed also on latest nightly. :(

Reverted to master for now.

slipperstree commented 3 months ago

I solved this by:

  1. Edit DockerFile, change 【FROM python:3.7-alpine ...】 to 【FROM python:3.8-alpine ...】
  2. Build Docker image youself by command: 【docker build . -t my-tabby-gateway:latest】
  3. Edit compose.yaml, change image from 【ghcr.io/eugeny/tabby-connection-gateway:latest】 to 【my-tabby-gateway:latest】 (note that you need also edit other settings in this file as well)
  4. Start docker container by command: 【docker-compose up -d】

hope it helps