@
oott123 谢谢大佬, 还是报错 , 如下 , 大佬 有空帮忙看看 .
Traceback (most recent call last):
File "
all-gists.py", line 11, in <module>
for gist in g.get_user().get_gists():
File "/usr/local/lib/python3.8/dist-packages/github/
PaginatedList.py", line 56, in __iter__
newElements = self._grow()
File "/usr/local/lib/python3.8/dist-packages/github/
PaginatedList.py", line 67, in _grow
newElements = self._fetchNextPage()
File "/usr/local/lib/python3.8/dist-packages/github/
PaginatedList.py", line 199, in _fetchNextPage
headers, data = self.__requester.requestJsonAndCheck(
File "/usr/local/lib/python3.8/dist-packages/github/
Requester.py", line 354, in requestJsonAndCheck
*self.requestJson(
File "/usr/local/lib/python3.8/dist-packages/github/
Requester.py", line 454, in requestJson
return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
File "/usr/local/lib/python3.8/dist-packages/github/
Requester.py", line 528, in __requestEncode
status, responseHeaders, output = self.__requestRaw(
File "/usr/local/lib/python3.8/dist-packages/github/
Requester.py", line 555, in __requestRaw
response = cnx.getresponse()
File "/usr/local/lib/python3.8/dist-packages/github/
Requester.py", line 127, in getresponse
r = verb(
File "/usr/lib/python3/dist-packages/requests/
sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/
sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/
sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/
adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/
connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/
connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/
client.py", line 1256, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/
client.py", line 1297, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.8/http/
client.py", line 1234, in putheader
raise ValueError('Invalid header value %r' % (values[i],))
ValueError: Invalid header value b'token xxxxxxxxxxxxxxxxxxx\n'