question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Artist ascii codec error \xeb

See original GitHub issue

Describe the bug

Pyatv is working fine except when some songs are playing. Then the script crashes.

Error log

Traceback (most recent call last):
  File "/homebridge/python/pyatv/scripts/atvremote.py", line 719, in _run_application
    return await cli_handler(loop)
  File "/homebridge/python/pyatv/scripts/atvremote.py", line 513, in cli_handler
    return await _handle_commands(args, config, loop)
  File "/homebridge/python/pyatv/scripts/atvremote.py", line 614, in _handle_commands
    ret = await _handle_device_command(args, cmd, atv, loop)
  File "/homebridge/python/pyatv/scripts/atvremote.py", line 652, in _handle_device_command
    return await _exec_command(atv.metadata, cmd, True, *cmd_args)
  File "/homebridge/python/pyatv/scripts/atvremote.py", line 692, in _exec_command
    _pretty_print(value)
  File "/homebridge/python/pyatv/scripts/atvremote.py", line 710, in _pretty_print
    print(data)
UnicodeEncodeError: 'ascii' codec can't encode character '\xeb' in position 84: ordinal not in range(128)

How to reproduce the bug?

Play Tiësto The Business

What is expected behavior?

Media type: Music Device state: Paused Title: The Business Artist: Tiësto Album: … Genre: Dance Position: 0/166s (0.0%) Repeat: Off Shuffle: Off

Operating System

oznu/docker-homebridge

Python

3.6

pyatv

0.9.8

Device

Apple TV 4k 15.4.1

Additional context

.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
m4rkv5commented, Jun 28, 2022

@postlund With push updates it now responds immediately. Thanks for the hint. I am using push updates via atvscript and node-red-node-daemon now.

1reaction
postlundcommented, Jun 28, 2022

Ok, then I will close it. I would recommend using push updates (either via atvremote or atvscript) instead of polling. Setting up a new connection every time is quite expensive, especially on low-end systems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UnicodeEncodeError: 'ascii' codec can't encode character u ...
I am using BeautifulSoup. The problem is that the error is not always reproducible; it sometimes works with some pages, and sometimes, it...
Read more >
Ascii error when scanning current music · Issue #42 - GitHub
I've been trying set the LANG env setting... When I do, headphones launch but the web server seems to crash (no log)... Can...
Read more >
'ascii' codec can't encode character '\xbb' in position 2616 ...
I was getting this error when making a web scraper tutorial by Corey Schafer(he is great btw). Anyways, I was going well with...
Read more >
'ascii\' codec can\'t encode character u\'\\u03b1\' in position 20 ...
I'm trying to write a to a csv file, I get the following error: UnicodeEncodeError: 'ascii' codec can't encode character u'u03b1' in ...
Read more >
FIXED: 'ascii' codec can't encode characters in position (Django)
if it is – change it according to your system. If the system is ok, then probably the problem is with you web...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found