nunoloureiro / birdtradebot

Cryptocurrency Bot that receives trading advice and performs transactions (manages wallets)
MIT License
13 stars 3 forks source link

[Bitfinex Branch] exchanges folder import #9

Closed njsalvador closed 6 years ago

njsalvador commented 6 years ago

Hi

On birdtradebot/birdtradebot/init.py line 32 I had to changed "from exchanges import bitfinex" to "from .exchanges import bitfinex". I was getting the following error: ModuleNotFoundError: No module named 'exchanges'

Don't know if it's related with my setup environment. I'm using redhat based linux with python 3.6 and virtualenv.

poupas commented 6 years ago

Sorry, but we cannot reproduce this issue on a python3.6-based virtualenv. Both on Ubuntu 17.10 and CentOS 7.4.

njsalvador commented 6 years ago

Ok, no problem. :)

I can leave here the full error, just for future reference if needed, and, if you want, you can close the ticket.

(srvbird) [user@server ~]$ cat /etc/*release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Amazon Linux AMI release 2018.03

(srvbird) [user@server ~]$ python -V
Python 3.6.5

(srvbird) [user@server ~]$ pip -V
pip 10.0.1 from /home/user/srvbird/local/lib/python3.6/dist-packages/pip (python 3.6)

(srvbird) [user@server ~]$ birdtradebot configure
Traceback (most recent call last):
  File "/home/user/srvbird/bin/birdtradebot", line 11, in <module>
    load_entry_point('birdtradebot', 'console_scripts', 'birdtradebot')()
  File "/home/user/srvbird/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 572, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/user/srvbird/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
    return ep.load()
  File "/home/user/srvbird/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2408, in load
    return self.resolve()
  File "/home/user/srvbird/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2414, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/user/birdtradebot/birdtradebot/__init__.py", line 32, in <module>
    from exchanges import bitfinex
ModuleNotFoundError: No module named 'exchanges'
poupas commented 6 years ago

You are totally correct.

This is a bug on our side. Since some people are depending on the broken behavior, I don't want to fix this now. I suggest you run the bot using python birdtradebot trade <...> and it will work.

Ideally, you could try the sub-accounts branch. Any feedback on that branch is welcome.