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

Decoding error #21

Closed
radix-aw opened this issue Mar 16, 2020 · 1 comment
Closed

Decoding error #21

radix-aw opened this issue Mar 16, 2020 · 1 comment

Comments

@radix-aw
Copy link

Hello. I am receiving the following error when trying to set a field in the control file:

deb-pkg-tools -p foo.deb -s "Version: 0.1"
2020-03-16 11:43:43 rothbard deb_pkg_tools.cli[29169] ERROR An error occurred! Aborting..
Traceback (most recent call last):
  File "/venv/lib/python3.6/site-packages/deb_pkg_tools/cli.py", line 215, in main
    action()
  File "/venv/lib/python3.6/site-packages/deb_pkg_tools/control.py", line 158, in patch_control_file
    defaults = Deb822(handle)
  File "/venv/lib/python3.6/site-packages/debian/deb822.py", line 633, in __init__
    self._internal_parser(iterable, fields, strict)
  File "/venv/lib/python3.6/site-packages/debian/deb822.py", line 784, in _internal_parser
    self._skip_useless_lines(sequence), strict):
  File "/venv/lib/python3.6/site-packages/debian/deb822.py", line 1093, in gpg_stripped_paragraph
    return cls.split_gpg_and_payload(sequence, strict)[1]
  File "/venv/lib/python3.6/site-packages/debian/deb822.py", line 1038, in split_gpg_and_payload
    for line in sequence:
  File "/venv/lib/python3.6/site-packages/debian/deb822.py", line 740, in _skip_useless_lines
    for line in sequence:
  File "/venv/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 133: invalid start byte

The above is on Python 3.6.9. The following is on Python 2.7.10:

2020-03-16 11:39:27 rothbard deb_pkg_tools.cli[27113] ERROR An error occurred! Aborting..
Traceback (most recent call last):
  File "/venv/local/lib/python2.7/site-packages/deb_pkg_tools/cli.py", line 235, in main
    action()
  File "/venv/local/lib/python2.7/site-packages/deb_pkg_tools/control.py", line 175, in patch_control_file
    defaults = Deb822(handle)
  File "/venv/local/lib/python2.7/site-packages/debian/deb822.py", line 633, in __init__
    self._internal_parser(iterable, fields, strict)
  File "/venv/local/lib/python2.7/site-packages/debian/deb822.py", line 785, in _internal_parser
    line = self.decoder.decode(linebytes)
  File "/venv/local/lib/python2.7/site-packages/debian/deb822.py", line 2346, in decode
    return value.decode(result['encoding'])
TypeError: decode() argument 1 must be string, not None

I've tried deb-pkg-tools 6.1 and 7.0.

@radix-aw
Copy link
Author

Please disregard. It seems this functionality is not available in deb-pkg-tools.

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