LeaveMyYard / BitmexGridTrader

The grid strategy bot for trading on bitmex with the PyQt5 User Interface
MIT License
35 stars 21 forks source link

Issues with the GUI loading #1

Closed caressgents closed 4 years ago

caressgents commented 4 years ago

Receiving this error after req's are installed:

python trade.py Traceback (most recent call last): File "trade.py", line 5, in <module> from sourse.ui.mainwindow import MainWindow File "/home/***/BitmexGridTrader/sourse/ui/mainwindow.py", line 1 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined

Any advice @LeaveMyYard ?

LeaveMyYard commented 4 years ago

Thanks for your question :)

This is a common Python problem. According to python docs annotations are available since Python 3.7.0b1, what means your Python version is not supported.

If you are using anaconda environment, you can specify a version while creating: conda create --name myenv --python=3.7

Or just update your current version: conda install python=3.7

More about anaconda you can find on official docs

LeaveMyYard commented 4 years ago

If you have more questions, feel free to ask

caressgents commented 4 years ago

@LeaveMyYard I've changed the version to the proper python mentioned above (however, i'm not on anaconda)

I'm now getting the following error:

python trade.py Traceback (most recent call last): File "trade.py", line 27, in <module> main() File "trade.py", line 21, in main window = MainWindow(loop) File "/home/nateflanders/BitmexGridTrader/sourse/ui/mainwindow.py", line 73, in __init__ self.handle = BitmexExchangeHandler(*self.current_settings.get_current_keys()) TypeError: Can't instantiate abstract class BitmexExchangeHandler with abstract methods get_symbols_data

Thank you in advance!

LeaveMyYard commented 4 years ago

It seems like an error with my crypto-futures-py library. I will create an issue there and will fix it during 24 hours.

LeaveMyYard commented 4 years ago

I've updated CryptoFuturesPy to 0.4.3, found and fixed some connector bugs. Also, updated this project to support new features of this library in 6a8b9c1e8266909ecbe2b082d8162da77414cb31 Now, it should start and work fine, just run pip install -r requirements.txt or just pip install crypto-futures-py==0.4.3

Try to update a project files and launch it.

Keep in mind, that there could exist some other bugs. For example, "Stop bot" button will not stop the grid from being updated, so I propose to close the bot window entirely to stop the bot. Also, always check your orders directly on bitmex to be sure that nothing went wrong.

Feel free to write here or to open a new issue if something will still work wrong :)

caressgents commented 4 years ago

@LeaveMyYard

Just pulled your latest update - still getting the following:

:~/BitmexGridTrader$ python trade.py Traceback (most recent call last): File "trade.py", line 5, in <module> from sourse.ui.mainwindow import MainWindow File "/home/*****/BitmexGridTrader/sourse/ui/mainwindow.py", line 1 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined

LeaveMyYard commented 4 years ago

@caressgents Check your python version again. This one is the same as was first.

caressgents commented 4 years ago

@LeaveMyYard I haven't changed it, but I did some updates to my entire env. I'll double check and report back. Thanks again

caressgents commented 4 years ago

@LeaveMyYard So, for some reason it did revert to python3.6, updated my version to 3.7 again, ran the script, and still getting the following:

~/BitmexGridTrader$ python trade.py Traceback (most recent call last): File "trade.py", line 27, in <module> main() File "trade.py", line 21, in main window = MainWindow(loop) File "/home/*****/BitmexGridTrader/sourse/ui/mainwindow.py", line 73, in __init__ self.handle = BitmexExchangeHandler(*self.current_settings.get_current_keys()) TypeError: Can't instantiate abstract class BitmexExchangeHandler with abstract methods get_symbols_data

LeaveMyYard commented 4 years ago

@caressgents Now update your CryptoFuturesPy by: pip install crypto-futures-py==0.4.3 or pip install -r requirements.txt

caressgents commented 4 years ago

Boom! Got it!

Testing it all out now! Thanks again.