python-mercadobitcoin
python-mercadobitcoin copied to clipboard
erro no python 3.7
C:\Users\Romeupc\GgUzbKZNcKZZiEWbVtSxtNhC44Zh3tX2pfon37\python.exe "C:/Users/Romeupc/PycharmProjects/untitled1/teste mbtc.py"
Traceback (most recent call last):
File "C:/Users/Romeupc/PycharmProjects/untitled1/teste mbtc.py", line 5, in
Process finished with exit code 1
Can you solved?
A possible solution is:
Instead of doing:
mbtc = TradeApi(<API_ID>, <API_SECRET>)
Do this:
mbtc = TradeApi(<API_ID>, bytes(<API_SECRET>, 'latin1'))
Contact the author to fix the source code to work in Python 3.x.
You can also modify the file trade_api.py, line 141: signature = hmac.new(self.secret, digestmod=hashlib.sha512) to: signature = hmac.new(self.secret.encode(), digestmod=hashlib.sha512)