Bug 65089

Summary: python journal wrapper TypeError
Product: systemd Reporter: virtualasdffdsa
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: virtualasdffdsa
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description virtualasdffdsa 2013-05-28 16:54:17 UTC
when trying to access an entry of the journal with the systemd.journal.Reader class, i get the following error:

  File "/usr/lib/python3.3/site-packages/systemd/journal.py", line 169, in _convert_field
    return convert(value)
TypeError: descriptor 'decode' requires a 'bytes' object but received a 'str'
Comment 1 virtualasdffdsa 2013-05-28 16:56:09 UTC
two lines above, it catches ValueException Errors, altough I think it should catch TypeErrors (which occur)
replacing line 167 "except ValueError:" with "except TypeError:" works fine
Comment 2 Zbigniew Jedrzejewski-Szmek 2013-05-29 18:15:20 UTC
This might be fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=0a0c35d151570.

If the above bugfix does not solve your problem, please provide python and systemd-python versions, and the offending journal or journal entry (from journalctl -o export).
Comment 3 Zbigniew Jedrzejewski-Szmek 2013-07-03 15:40:00 UTC
I'm pretty sure this is fixed by the above-mentioned commit.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.