negociecoins: 'bytes' object has no attribute 'encode'
See original GitHub issue- OS: Windows
- CCXT version: 1.8.375
- Exchange: negociecoins
- Method: fetch_balance
I get the following error then trying to fetch_balance()
Traceback (most recent call last):
File "main.py", line 10, in <module>
print(neg.fetch_balance())
File "/home/user/.local/lib/python3.5/site-packages/ccxt/negociecoins.py", line 174, in fetch_balance
balances = self.privateGetUserBalance(params)
File "/home/user/.local/lib/python3.5/site-packages/ccxt/base/exchange.py", line 388, in inner
return entry(_self, **inner_kwargs)
File "/home/user/.local/lib/python3.5/site-packages/ccxt/base/exchange.py", line 417, in request
return self.fetch2(path, api, method, params, headers, body)
File "/home/user/.local/lib/python3.5/site-packages/ccxt/base/exchange.py", line 412, in fetch2
request = self.sign(path, api, method, params, headers, body)
File "/home/user/.local/lib/python3.5/site-packages/ccxt/negociecoins.py", line 316, in sign
signature = self.hmac(self.encode(payload), self.encode(secret), hashlib.sha256, 'base64')
File "/home/user/.local/lib/python3.5/site-packages/ccxt/base/exchange.py", line 962, in encode
return string.encode()
AttributeError: 'bytes' object has no attribute 'encode'
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AttributeError:'bytes' object has no attribute 'encode'
chr returns a string that gets multiplied and encoded as bytes. · Python2 strings are implicitly bytes objects while Python3 strings are unicode....
Read more >13391 (AttributeError: 'bytes' object has no attribute 'encode')
How to Reproduce. While doing a GET operation on /prefs/localization , Trac issued an internal error. The issue in ticket:13378 is related to...
Read more >Sending mails with attachment results in 'bytes' object has no ...
When trying to send a EMail with attachment, it always failed with the following Exception: 'bytes' object has no attribute 'encode'.
Read more >git-review on MacOS fails with 'bytes' object has no attribute ...
"GET https://vraikov@bellevue-ci-gerrit.eng.vmware.com:443/a/changes/?q=169795&o=CURRENT_REVISION". 'bytes' object has no attribute 'encode'.
Read more >AttributeError: 'bytes' object has no attribute 'encode'
The Python AttributeError: 'bytes' object has no attribute 'encode' occurs when we call the `encode()` method on a bytes object. To solve the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @kroitor.
Im getting the following error with the new version (im new to all of this, so sorry if its a newbie error):
It requires a symbol argument (first positional argument to fetchOrders), more about it here: https://github.com/ccxt/ccxt/wiki/Manual#querying-orders