zyairelai / futures-hero

❗ HIGH RISK ❗ Scalping Trading on Binance Futures
163 stars 48 forks source link

AttributeError: 'NoneType' object has no attribute 'encode' #3

Closed sanaeefar-saeed closed 3 years ago

sanaeefar-saeed commented 3 years ago

Hello , I'm getting this error while running script Traceback (most recent call last): File "check.py", line 46, in try: check() File "check.py", line 40, in check print("\nThe return value is : " + get_position_info()) File "/home/saeed/futures-omax-master/get_position.py", line 9, in get_position_info response = binance_futures.position_information()[0] File "/home/saeed/futures-omax-master/binance_futures.py", line 17, in position_information def position_information() : return client.futures_position_information(symbol=config.pair, timestamp=get_timestamp()) File "/home/saeed/.local/lib/python3.8/site-packages/binance/client.py", line 3688, in futures_position_information return self._request_futures_api('get', 'positionRisk', True, data=params) File "/home/saeed/.local/lib/python3.8/site-packages/binance/client.py", line 222, in _request_futures_api return self._request(method, uri, signed, True, **kwargs) File "/home/saeed/.local/lib/python3.8/site-packages/binance/client.py", line 180, in _request kwargs['data']['signature'] = self._generate_signature(kwargs['data']) File "/home/saeed/.local/lib/python3.8/site-packages/binance/client.py", line 135, in _generate_signature m = hmac.new(self.API_SECRET.encode('utf-8'), query_string.encode('utf-8'), hashlib.sha256) AttributeError: 'NoneType' object has no attribute 'encode'

zyairelai commented 3 years ago

This is a solved issue. Please refer to https://github.com/zyairelai/futures-omax/issues/1#event-4325774265