JakeWharton / JakeWharton/pidcat

UnicodeEncodeError: 'ascii' codec can't encode characters

Open
#153 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5k
Forks
517
PR merge metrics
No merged PRs in 30d

Description

Sometimes went not filtering the log by package name I run into this error:

> Traceback (most recent call last):
> File "./pidcat.py", line 305, in
> print(linebuf)
> UnicodeEncodeError: 'ascii' codec can't encode characters in position 117-118: ordinal not in range(128)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in pidcat.py at line 305, where the traceback shows print(linebuf) failing, and reproduce the problem with log output containing non-ASCII characters. Done means the script can process and display such log entries without raising UnicodeEncodeError, including when filtering is not used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.