Run python3 main.py <<EOF
开始尝试为用户0421打卡
<class 'requests.exceptions.ConnectionError'>
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connection.py", line 170, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connection.py", line 182, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f43fd0d5c10>: Failed to establish a new connection: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/urllib3/util/retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='server.17wanxiao.com', port=443): Max retries exceeded with url: /campus/cam_iface46/exchangeSecretkey.action (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f43fd0d5c10>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 28, in main
campus = CampusCard(phone[index], password[index])
File "/home/runner/work/HAUT_autoCheck/HAUT_autoCheck/campus/campus.py", line 25, in init
self.exchange_secret()
File "/home/runner/work/HAUT_autoCheck/HAUT_autoCheck/campus/campus.py", line 66, in exchange_secret
verify=False
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='server.17wanxiao.com', port=443): Max retries exceeded with url: /campus/cam_iface46/exchangeSecretkey.action (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f43fd0d5c10>: Failed to establish a new connection: [Errno 110] Connection timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 222, in
main()
File "main.py", line 61, in main
result=response
UnboundLocalError: local variable 'response' referenced before assignment
Error: Process completed with exit code 1.