Bug 65089 - python journal wrapper TypeError
Summary: python journal wrapper TypeError
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-28 16:54 UTC by virtualasdffdsa
Modified: 2013-07-03 15:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.