BitMEX / easy-data-scripts

A few Python scripts to easily get data from the BitMEX API.
102 stars 50 forks source link

Python 3 - SyntaxError bitmex.py #3

Closed DandiestSquare1 closed 6 years ago

DandiestSquare1 commented 6 years ago

get error using Python 3.6.2 on Win 10

command that produced error: python fetchExecutionTradeHistory.py -h

error:

  File "fetchExecutionTradeHistory.py", line 5, in <module>
    from lib import bitmex
  File "C:\python\BitMEX-easy-data-scripts\lib\bitmex.py", line 203
    except requests.exceptions.HTTPError, e:
                                        ^
SyntaxError: invalid syntax
STRML commented 6 years ago

This isn't intended for py3 compatibility, please run using py2.

DandiestSquare1 commented 6 years ago

In order to import using Python 3, I had to make a couple of changes: