maximilien / ghtrack

A python tool to keep track of GitHub users stats
Apache License 2.0
3 stars 3 forks source link

Traceback when collecting commits in `knative-sandbox` #10

Closed maximilien closed 1 year ago

maximilien commented 4 years ago

Bug report

Any ./ght stats ... call on knative-sandbox results in eventual traceback. Seems to be OK for some of the repos but consistently failed on others.

Traceback (most recent call last):---------------------------] 22.6% ...processing repos
  File "/Users/maximilien/github/ghtrack/cli.py", line 630, in execute
    rc = func()
  File "/Users/maximilien/github/ghtrack/cli.py", line 767, in stats
    self._update_users_commits()
  File "/Users/maximilien/github/ghtrack/cli.py", line 410, in _update_users_commits
    commits_count = self.client.commits_count(repo, user, self.start_date(), self.end_date())
  File "/Users/maximilien/github/ghtrack/client.py", line 137, in commits_count
    for sc in repo.get_stats_contributors():
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Repository.py", line 2834, in get_stats_contributors
    headers, data = self._requester.requestJsonAndCheck(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 318, in requestJsonAndCheck
    *self.requestJson(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 410, in requestJson
    return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 471, in __requestEncode
    status, responseHeaders, output = self.__requestRaw(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 515, in __requestRaw
    return self.__requestRaw(original_cnx, verb, url, requestHeaders, input)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 515, in __requestRaw
    return self.__requestRaw(original_cnx, verb, url, requestHeaders, input)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 515, in __requestRaw
    return self.__requestRaw(original_cnx, verb, url, requestHeaders, input)
  [Previous line repeated 965 more times]
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 498, in __requestRaw
    response = cnx.getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github/Requester.py", line 110, in getresponse
    r = verb(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests-2.23.0-py3.8.egg/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests-2.23.0-py3.8.egg/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests-2.23.0-py3.8.egg/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/requests-2.23.0-py3.8.egg/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3-1.25.9-py3.8.egg/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3-1.25.9-py3.8.egg/urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/urllib3-1.25.9-py3.8.egg/urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1322, in getresponse
    response.begin()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 327, in begin
    self.headers = self.msg = parse_headers(self.fp)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 221, in parse_headers
    return email.parser.Parser(_class=_class).parsestr(hstring)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/parser.py", line 67, in parsestr
    return self.parse(StringIO(text), headersonly=headersonly)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/parser.py", line 56, in parse
    feedparser.feed(data)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/feedparser.py", line 176, in feed
    self._call_parse()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/feedparser.py", line 180, in _call_parse
    self._parse()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/feedparser.py", line 295, in _parsegen
    if self._cur.get_content_maintype() == 'message':
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/message.py", line 594, in get_content_maintype
    ctype = self.get_content_type()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/message.py", line 578, in get_content_type
    value = self.get('content-type', missing)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/message.py", line 471, in get
    return self.policy.header_fetch_parse(k, v)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/_policybase.py", line 316, in header_fetch_parse
    return self._sanitize_header(name, value)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/_policybase.py", line 287, in _sanitize_header
    if _has_surrogates(value):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/email/utils.py", line 57, in _has_surrogates
    s.encode()
RecursionError: maximum recursion depth exceeded while calling a Python object

Expected behavior

No errrors

Steps to reproduce the problem

Any stats call

./ght version

./ght --version
GH Track v0.3.5.3

Python version

Python 2.7.15

/kind bug

github-actions[bot] commented 1 year ago

This issue appears to be staled. Please update status and need or risk for it to be archived.