yasinkuyu / binance-trader

💰 Cryptocurrency Trading Bot for Binance (Experimental)
2.54k stars 833 forks source link

Docker run import 'Trading' error #137

Closed ikuru9 closed 6 years ago

ikuru9 commented 6 years ago

Traceback (most recent call last):
File "./trader.py", line 9, in
from Trading import Trading
ModuleNotFoundError: No module named 'Trading'

siutin commented 6 years ago
  1. Change Dockerfile to the following and then build it:

    FROM python:3
    ADD app/* /
    ADD trader.py /
    RUN pip install requests
    CMD [ "python", "./trader.py" ]
  2. Rename ./db/orders.sample.db to ./db/orders.db

  3. Run in container with database mapping docker run -t -i -v $(pwd)/db/orders.db:/db/orders.db trader

kompots commented 6 years ago

Go the same issue :(

http://prntscr.com/i4jxt9