ghtopdep icon indicating copy to clipboard operation
ghtopdep copied to clipboard

Error running on Apple M2 chip

Open korthout opened this issue 2 years ago • 1 comments

I ran into an error:

ghtopdep https://github.com/github-tooling/ghtopdep
⠧ Fetching information about repositoriesTraceback (most recent call last):
  File "/opt/homebrew/bin/ghtopdep", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/ghtopdep/ghtopdep.py", line 190, in cli
    page_url = get_page_url(sess, url, destination)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/ghtopdep/ghtopdep.py", line 108, in get_page_url
    main_response = sess.get(page_url)
                    ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/requests/sessions.py", line 747, in send
    r.content
  File "/opt/homebrew/lib/python3.11/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/opt/homebrew/lib/python3.11/site-packages/urllib3/response.py", line 932, in stream
⠇ Fetching information about repositories    yield from self.read_chunked(amt, decode_content=decode_content)
  File "/opt/homebrew/lib/python3.11/site-packages/urllib3/response.py", line 1072, in read_chunked
    self._update_chunk_length()
  File "/opt/homebrew/lib/python3.11/site-packages/cachecontrol/adapter.py", line 117, in _update_chunk_length
    self._fp._close()
  File "/opt/homebrew/lib/python3.11/site-packages/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/opt/homebrew/lib/python3.11/site-packages/cachecontrol/controller.py", line 353, in cache_response
    self._cache_set(cache_url, request, response, body, expires_time)
  File "/opt/homebrew/lib/python3.11/site-packages/cachecontrol/controller.py", line 274, in _cache_set
    self.serializer.dumps(request, response, body),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/cachecontrol/serialize.py", line 54, in dumps
    u"strict": response.strict,
               ^^^^^^^^^^^^^^^
AttributeError: 'HTTPResponse' object has no attribute 'strict'
Also on python 3.10

ghtopdep https://github.com/github-tooling/ghtopdep
⠹ Fetching information about repositoriesTraceback (most recent call last):
  File "/opt/homebrew/bin/ghtopdep", line 8, in <module>
    sys.exit(cli())
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/ghtopdep/ghtopdep.py", line 190, in cli
    page_url = get_page_url(sess, url, destination)
  File "/opt/homebrew/lib/python3.10/site-packages/ghtopdep/ghtopdep.py", line 108, in get_page_url
    main_response = sess.get(page_url)
  File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/requests/sessions.py", line 747, in send
    r.content
  File "/opt/homebrew/lib/python3.10/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
  File "/opt/homebrew/lib/python3.10/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/response.py", line 932, in stream
    yield from self.read_chunked(amt, decode_content=decode_content)
  File "/opt/homebrew/lib/python3.10/site-packages/urllib3/response.py", line 1072, in read_chunked
    self._update_chunk_length()
  File "/opt/homebrew/lib/python3.10/site-packages/cachecontrol/adapter.py", line 117, in _update_chunk_length
    self._fp._close()
  File "/opt/homebrew/lib/python3.10/site-packages/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/opt/homebrew/lib/python3.10/site-packages/cachecontrol/controller.py", line 353, in cache_response
    self._cache_set(cache_url, request, response, body, expires_time)
  File "/opt/homebrew/lib/python3.10/site-packages/cachecontrol/controller.py", line 274, in _cache_set
    self.serializer.dumps(request, response, body),
  File "/opt/homebrew/lib/python3.10/site-packages/cachecontrol/serialize.py", line 54, in dumps
    u"strict": response.strict,
AttributeError: 'HTTPResponse' object has no attribute 'strict'

I'm running this from a zsh shell on macOS 13.3.1 with M2 Pro (ARM) chip.

ghtopdep works correctly on my old macbook running macOS 12.6.5 with Intel Core i7.

korthout avatar May 29 '23 10:05 korthout

Hello, I have developed a similar tool using the Go language. You can download the compiled executable file on the release page. I hope it can help you.

Tool Link: https://github.com/zer0yu/ghtracker

zer0yu avatar Jan 25 '24 15:01 zer0yu

i have Apple M1 Pro and its works fine, please reopen if you still have such issue

andriyor avatar Aug 02 '24 21:08 andriyor

Tested successfully with 0.4.3

korthout avatar Aug 06 '24 11:08 korthout