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.

[BUG] bpytop crashes, iTerm 2, openssh, locale error

See original GitHub issue

Describe the bug

I start bpytop with bpytop -lc press “h” for help, click the mouse, it crashes

To Reproduce

Install bpytop from this debian repository: https://packages.azlux.fr/ start bpytop with bpytop -lc and click around with the mouse

Expected behavior

I start bpytop with bpytop -lc , click the mouse as much as I like and it does not crash

Logs

cat /root/.config/bpytop/error.log

13/01/21 (16:07:09) | ERROR: Input thread failed with exception: 'utf-8' codec can't decode byte 0x9a in position 4: invalid start byte
Traceback (most recent call last):
  File "/usr/local/bin/bpytop", line 866, in _get_key
    input_key += sys.stdin.read(1)                                              #* Read 1 key safely with blocking on
  File "/usr/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 4: invalid start byte
13/01/21 (16:07:10) | WARNING: Exiting with errorcode (1). Runtime 0:00:16

13/01/21 (16:07:21) | ERROR: Input thread failed with exception: 'utf-8' codec can't decode byte 0x9c in position 4: invalid start byte
Traceback (most recent call last):
  File "/usr/local/bin/bpytop", line 866, in _get_key
    input_key += sys.stdin.read(1)                                              #* Read 1 key safely with blocking on
  File "/usr/lib/python3.7/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 4: invalid start byte
13/01/21 (16:07:21) | WARNING: Exiting with errorcode (1). Runtime 0:00:08

Info (please complete the following information): bpytop -v

bpytop version: 1.0.59
psutil version: 5.8.0

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
  • Terminal used: iTerm 2 on OSX
  • Font used: no idea how to find out python3 --version Python 3.7.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oviziicommented, Jan 13, 2021

So after googling locale problems in connection with iTerm2 I found a solution for Debian:

edit /etc/ssh/sshd_config and disallow setting of locales by clients:

AcceptEnv no

it was previously set to: AcceptEnv LANG LC_*

Now bpytop works perfectly, even without the “-lc” and using the mouse works as well without any crashes!

0reactions
aristocratoscommented, Jan 13, 2021

@ovizii Awesome! Renaming this so it’s easier to find for anyone with similar problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FAQ - iTerm2 - macOS Terminal Replacement
Create a new profile called "ssh". In the General tab, select the Command: button and enter $$ as the command. In Preferences->Profiles->General, select...
Read more >
Just downloaded iterm and crashing instantly when attempting ...
to iterm2-discuss. Hi,. I've been having this issue and I couldn't seem to find any help online. Here are my computer specs:.
Read more >
bashtop: Linux/OSX/FreeBSD resource monitor - Gitee
Any support is greatly appreciated! Prerequisites. Mac Os X. Will not display correctly in the standard terminal! Recommended alternative iTerm2. Will also need ......
Read more >
TUIs | Hacker News
I like the low-power aspect of TUIs, but the problem I have with using them over GUI software is there is no launcher...
Read more >
how to install express in console Code Example
If it still fails, a git process may have crashed in this repository earlier: ... 00h00m00s 0/0: : ERROR: [Errno 2] No such...
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