base.auth()出错

我的代码:from seatable_api import Base, context

server_url = context.server_url or ‘https://cloud.seatable.cn
api_token = context.api_token or ‘c3c75d65859849455a39f4436147639cf02b2d’

base = Base(api_token, server_url)
base.auth()

print(base),报错误如下:error: Error: line 199, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/util/connection.py”, line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/socket.py”, line 974, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -2] Name does not resolve The above exception was the direct cause of the following exception: Traceback (most recent call last): File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 789, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 495, in _make_request conn.request( File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 441, in request self.endheaders() File “/usr/local/lib/python3.11/http/client.py”, line 1298, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File “/usr/local/lib/python3.11/http/client.py”, line 1058, in _send_output self.send(msg) File “/usr/local/lib/python3.11/http/client.py”, line 996, in send self.connect() File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 279, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/connection.py”, line 206, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x14958dec5cd0>: Failed to resolve ‘http’ ([Errno -2] Name does not resolve) The above exception was the direct cause of the following exception: Traceback (most recent call last): File “/home/seatable/.local/lib/python3.11/site-packages/requests/adapters.py”, line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/connectionpool.py”, line 843, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/urllib3/util/retry.py”, line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘http’, port=80): Max retries exceeded with url: /47.98.173.128:8086/api/v2.1/dtable/app-access-token/ (Caused by NameResolutionError(“<urllib3.connection.HTTPConnection object at 0x14958dec5cd0>: Failed to resolve ‘http’ ([Errno -2] Name does not resolve)”)) During handling of the above exception, another exception occurred: Traceback (most recent call last): File “/scripts/index.py”, line 8, in base.auth() File “/home/seatable/.local/lib/python3.11/site-packages/seatable_api/main.py”, line 98, in auth response = requests.get(url, headers=headers, timeout=self.timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/requests/api.py”, line 73, in get return request(“get”, url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/requests/api.py”, line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/requests/sessions.py”, line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/requests/sessions.py”, line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/home/seatable/.local/lib/python3.11/site-packages/requests/adapters.py”, line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘http’, port=80): Max retries exceeded with url: /47.98.173.128:8086/api/v2.1/dtable/app-access-token/ (Caused by NameResolutionError(“<urllib3.connection.HTTPConnection object at 0x14958dec5cd0>: Failed to resolve ‘http’ ([Errno -2] Name does not resolve)”))

我写了另外一个脚本,又是正常的,如下: