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

Percol generates journal messages of several tens kilobytes each #86

Open
al-berger opened this issue Nov 23, 2015 · 1 comment
Open

Comments

@al-berger
Copy link

When invoking Percol with the contents of bash history as input, it generates error messages (seemingly due to some encoding issues) of several tens kilobytes each and they are stored in the systemd journal. The messages are like this:

Nov 22 15:44:37 localhost Percol[500]: display_results: __cause__: None | __class__: <class 'UnicodeDecodeError'> | __context__: None | __delattr__: <method-wrapper '__delattr__' of UnicodeDecodeError object at 0xb67a6d6c> | __dict__: {} | __dir__: <built-in method __dir__ of UnicodeDecodeError object at 0xb67a6d6c> | __doc__: Unicode decoding error. | __eq__: <method-wrapper '__eq__' of UnicodeDecodeError object at 0xb67a6d6c> | __format__: <built-in method __format__ of UnicodeDecodeError object at 0xb67a6d6c> | __ge__: <method-wrapper '__ge__' of UnicodeDecodeError object at 0xb67a6d6c> | __getattribute__: <method-wrapper '__getattribute__' of UnicodeDecodeError object at 0xb67a6d6c> | __gt__: <method-wrapper '__gt__' of UnicodeDecodeError object at 0xb67a6d6c> | __hash__: <method-wrapper '__hash__' of UnicodeDecodeError object at 0xb67a6d6c> | __init__: <method-wrapper '__init__' of UnicodeDecodeError object at 0xb67a6d6c> | __le__: <method-wrapper '__le__' of UnicodeDecodeError object at 0xb67a6d6c> | __lt__: <method-wrapper '__lt__' of UnicodeDecodeError object at 0xb67a6d6c> | __ne__: <method-wrapper '__ne__' of UnicodeDecodeError object at 0xb67a6d6c> | __new__: <built-in method __new__ of type object at 0xb77000a0> | __reduce__: <built-in method __reduce__ of UnicodeDecodeError object at 0xb67a6d6c> | __reduce_ex__: <built-in method __reduce_ex__ of UnicodeDecodeError object at 0xb67a6d6c> | __repr__: <method-wrapper '__repr__' of UnicodeDecodeError object at 0xb67a6d6c> | __setattr__: <method-wrapper '__setattr__' of UnicodeDecodeError object at 0xb67a6d6c> | __setstate__: <built-in method __setstate__ of UnicodeDecodeError object at 0xb67a6d6c> | __sizeof__: <built-in method __sizeof__ of UnicodeDecodeError object at 0xb67a6d6c> | __str__: <method-wrapper '__str__' of UnicodeDecodeError object at 0xb67a6d6c> | __subclasshook__: <built-in method __subclasshook__ of type object at 0xb77000a0> | __suppress_context__: False | __traceback__: <traceback object at 0xb69845a4> | args: ('utf-8', b'
[Further a couple of thousands of bash history lines are listed]

How this can be prevented?

Thanks.

EDIT: Tried several variants of error output redirection:

bind -x '"\C-R": READLINE_LINE=$(history | tac | cut -c 8- | percol --query "${READLINE_LINE}" 2>/dev/null) READLINE_POINT='
bind -x '"\C-R": READLINE_LINE=$(history | tac | cut -c 8- | percol --query "${READLINE_LINE}") 2>/dev/null READLINE_POINT='
bind -x '"\C-R": READLINE_LINE=$(history | tac | cut -c 8- | percol --query "${READLINE_LINE}") READLINE_POINT="" 2>/dev/null'
bind -x '"\C-R": READLINE_LINE=$(history | tac | cut -c 8- | percol --query "${READLINE_LINE}") READLINE_POINT= 2>/dev/null'
bind -x '"\C-R": READLINE_LINE=$(history | tac | cut -c 8- | percol --query "${READLINE_LINE}") READLINE_POINT=' 2>/dev/null

But this doesn't seem to be working.

@clach04
Copy link

clach04 commented Aug 28, 2024

I'm a little confused why syslog is being used (in debug.py).

I'm about to remove that from my fork (necessary for Windows support).

clach04 added a commit to clach04/percolator that referenced this issue Aug 29, 2024
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

2 participants