This repository was archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
This repository was archived by the owner on May 23, 2023. It is now read-only.
Error #4
Copy link
Copy link
Open
Description
Hi,
I am executing sample code but getting following error
Code:
import sys
import hotbit
try:
authenticatorCode = sys.argv[1]
except Exception as e:
raise e
email = "xxx"
password = "xxx"
captchaKey = "xxxxxxxxxxxx"
auth = hotbit.auth.login(email=email, password=password, authenticatorCode=authenticatorCode, antiCaptcha=captchaKey) #If you use 2Captcha write twoCaptcha instead of antiCaptcha
client = hotbit.Hotbit(auth)
print(client.balanceQuery())
Error:
Traceback (most recent call last):
File "/Volumes/MacintoshHD/python/hotbit-bot/main.py", line 19, in <module>
client = hotbit.Hotbit(auth)
File "/usr/local/lib/python3.9/site-packages/hotbit/__init__.py", line 6, in Hotbit
return Hotbit(auth)
File "/usr/local/lib/python3.9/site-packages/hotbit/reverseApi.py", line 37, in __init__
self.sessionWS.post('wss://ws.hotbit.io/', json=payload, encryption="gzip", identifiers={"id": 300})
File "/usr/local/lib/python3.9/site-packages/requestsWS/session.py", line 128, in post
resp = _post(ws=self.ws, wsUrl=wsUrl, wsData=self.wsData, headers=headers, encryption=encryption, data=data, json=json, waitForResponse=waitForResponse, identifiers=identifiers, timeout=timeout, debug=debug)
File "/usr/local/lib/python3.9/site-packages/requestsWS/session.py", line 68, in __init__
ws = create_connection(wsUrl, header=headers, enable_multithread=True)
File "/usr/local/lib/python3.9/site-packages/websocket/_core.py", line 596, in create_connection
websock.connect(url, **options)
File "/usr/local/lib/python3.9/site-packages/websocket/_core.py", line 253, in connect
self.handshake_response = handshake(self.sock, *addrs, **options)
File "/usr/local/lib/python3.9/site-packages/websocket/_handshake.py", line 51, in handshake
headers, key = _get_handshake_headers(resource, hostname, port, options)
File "/usr/local/lib/python3.9/site-packages/websocket/_handshake.py", line 98, in _get_handshake_headers
if 'header' not in options or 'Sec-WebSocket-Key' not in options['header']:
TypeError: argument of type 'NoneType' is not iterable
Metadata
Metadata
Assignees
Labels
No labels