You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
print(mbtc.list_orders(coin_pair="BRLBTC"))
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66-packages\mercadobitcoin\trade_api.py", line 74, in list_orders
return self.__check_response(self.__post_tapi("list_orders", kwargs ))
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66-packages\mercadobitcoin\trade_api.py", line 133, in __post_tapi
"TAPI-MAC": self.__signature(payload)
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66-packages\mercadobitcoin\trade_api.py", line 141, in __signature
signature = hmac.new(self.secret, digestmod=hashlib.sha512)
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66.py", line 153, in new
return HMAC(key, msg, digestmod)
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66.py", line 49, in init
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).name)
TypeError: key: expected bytes or bytearray, but got 'str'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
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)
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
print(mbtc.list_orders(coin_pair="BRLBTC"))
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66-packages\mercadobitcoin\trade_api.py", line 74, in list_orders
return self.__check_response(self.__post_tapi("list_orders", kwargs ))
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66-packages\mercadobitcoin\trade_api.py", line 133, in __post_tapi
"TAPI-MAC": self.__signature(payload)
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66-packages\mercadobitcoin\trade_api.py", line 141, in __signature
signature = hmac.new(self.secret, digestmod=hashlib.sha512)
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66.py", line 153, in new
return HMAC(key, msg, digestmod)
File "C:\Users\Romeupc\GgUzbKZNcKZZiEUzCE1pZpitdNYTNRLAZacF4eKrUf35f66.py", line 49, in init
raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).name)
TypeError: key: expected bytes or bytearray, but got 'str'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered: