spapas / python-git-info

A simple project to get information from the git repository of your project
https://pypi.org/project/python-git-info/
MIT License
28 stars 8 forks source link

zlib.error: Error -5 while decompressing data: incomplete or truncated stream #11

Closed glensc closed 2 years ago

glensc commented 2 years ago

With python-git-info = "==0.7.1"

From https://github.com/Taxel/PlexTraktSync/runs/7342095597?check_suite_focus=true:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/PlexTraktSync/PlexTraktSync/plextraktsync/__main__.py", line 18, in <module>
    cli()
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/runner/work/PlexTraktSync/PlexTraktSync/plextraktsync/cli.py", line 28, in wrap
    cmd(*args, **kwargs)
  File "/home/runner/work/PlexTraktSync/PlexTraktSync/plextraktsync/commands/info.py", line 13, in info
    print(f"PlexTraktSync Version: {get_version()}")
  File "/home/runner/work/PlexTraktSync/PlexTraktSync/plextraktsync/version.py", line 22, in version
    gv = git_version_info()
  File "/home/runner/work/PlexTraktSync/PlexTraktSync/plextraktsync/version.py", line 7, in git_version_info
    commit = get_git_info()
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/gitinfo/gitinfo.py", line 101, in get_git_info
    return get_git_info_dir(gitdir)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/gitinfo/gitinfo.py", line 77, in get_git_info_dir
    r = get_pack_info(idx_file, gi)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/gitinfo/pack_reader.py", line 171, in get_pack_info
    data = get_object(fin, pack_idx)
  File "/opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/gitinfo/pack_reader.py", line 129, in get_object
    data = zlib.decompress(fin.read(obj_len))
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
Error: Process completed with exit code 1.
spapas commented 2 years ago

Hello, yes I can reproduce the error, it is thrown on the the PlexTraktSync repo... I'll try to research it a bit tomorrow thank you!

spapas commented 2 years ago

Can you try with the version 0.7.2 ? https://pypi.org/project/python-git-info/0.7.2/ TY

glensc commented 2 years ago

0.7.2 has some debug prints enabled, waiting for 0.7.3

spapas commented 2 years ago

Sorry must be ok now

spapas commented 2 years ago

Hey @glensc have you been able to try the latest version ? is it working now so I can close the issue ? TY

glensc commented 2 years ago

i'm waiting dependabot to update it automatically ;) so wait another week (I think the updates are weekly).

glensc commented 2 years ago

https://github.com/Taxel/PlexTraktSync/pull/977#issuecomment-1186776873