Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSLError: The read operation timed out #77

Open
beyondzhou opened this issue May 21, 2014 · 0 comments
Open

SSLError: The read operation timed out #77

beyondzhou opened this issue May 21, 2014 · 0 comments

Comments

@beyondzhou
Copy link

Example 7-3

1. Code

from github import Github

ACCESS_TOKEN = ''

USER = 'ptwobrussell'
REPO = 'Mining-the-Social-Web'
client = Github(ACCESS_TOKEN, per_page=100)
user = client.get_user(USER)
repo = user.get_repo(REPO)

stargaers = [s for s in repo.get_stargazers()]
print "Number of stagazers", len(stargazers)

2. Capture

SSLError Traceback (most recent call last)
in ()
15 # Since you'll get a lazy iterator back, you have to traverse
16 # it if you want to get the total number of stargazers
---> 17 stargaers = [s for s in repo.get_stargazers()]
18 print "Number of stagazers", len(stargazers)

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\PaginatedList.pyc in iter(self)
46 yield element
47 while self._couldGrow():
---> 48 newElements = self._grow()
49 for element in newElements:
50 yield element

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\PaginatedList.pyc in _grow(self)
58
59 def _grow(self):
---> 60 newElements = self._fetchNextPage()
61 self.__elements += newElements
62 return newElements

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\PaginatedList.pyc in _fetchNextPage(self)
156 "GET",
157 self.__nextUrl,
--> 158 parameters=self.__nextParams
159 )
160

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\Requester.pyc in requestJsonAndCheck(self, verb, url, parameters, headers, input, cnx)
167
168 def requestJsonAndCheck(self, verb, url, parameters=None, headers=None, input=None, cnx=None):
--> 169 return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
170
171 def requestMultipartAndCheck(self, verb, url, parameters=None, headers=None, input=None):

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\Requester.pyc in requestJson(self, verb, url, parameters, headers, input, cnx)
208 return "application/json", json.dumps(input)
209
--> 210 return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
211
212 def requestMultipart(self, verb, url, parameters=None, headers=None, input=None):

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\Requester.pyc in __requestEncode(self, cnx, verb, url, parameters, requestHeaders, input, encode)
245 self.NEW_DEBUG_FRAME(requestHeaders)
246
--> 247 status, responseHeaders, output = self.__requestRaw(cnx, verb, url, requestHeaders, encoded_input)
248
249 if "x-ratelimit-remaining" in responseHeaders and "x-ratelimit-limit" in responseHeaders:

C:\Python27\lib\site-packages\pygithub-1.25.0-py2.7.egg\github\Requester.pyc in __requestRaw(self, cnx, verb, url, requestHeaders, input)
275 status = response.status
276 responseHeaders = dict((k.lower(), v) for k, v in response.getheaders())
--> 277 output = response.read()
278
279 cnx.close()

C:\Python27\lib\httplib.pyc in read(self, amt)
546 s = self.fp.read()
547 else:
--> 548 s = self._safe_read(self.length)
549 self.length = 0
550 self.close() # we read everything

C:\Python27\lib\httplib.pyc in _safe_read(self, amt)
645 s = []
646 while amt > 0:
--> 647 chunk = self.fp.read(min(amt, MAXAMOUNT))
648 if not chunk:
649 raise IncompleteRead(''.join(s), amt)

C:\Python27\lib\socket.pyc in read(self, size)
378 # fragmentation issues on many platforms.
379 try:
--> 380 data = self._sock.recv(left)
381 except error, e:
382 if e.args[0] == EINTR:

C:\Python27\lib\ssl.pyc in recv(self, buflen, flags)
239 "non-zero flags not allowed in calls to recv() on %s" %
240 self.class)
--> 241 return self.read(buflen)
242 else:
243 return self._sock.recv(buflen, flags)

C:\Python27\lib\ssl.pyc in read(self, len)
158
159 try:
--> 160 return self._sslobj.read(len)
161 except SSLError, x:
162 if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:

SSLError: The read operation timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant