This error pops up.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/cian_parser/v2/main.py", line 26, in main
    response= str(input(">>> ")).lower()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte

The script is executed on a linux server. The error does not come out immediately, maybe immediately at startup, maybe after 10-20 minutes.

Are you typing something on the keyboard? attach the part of the code where the error occurs

Anatoly Kritskiy2022-02-08 07:51:13

The script writes status to the console, I start typing one character into the console and immediately an error, before that I entered commands -everything was fine (in this session). Sometimes the error crashes immediately upon startup.

Boro8ey2022-02-08 07:51:13

You first read the input, and then call operations on it.

0andriy2022-02-08 07:51:13

@Boro8ey what exactly are you entering? on my ubuntu server, the line response= str(input(">>>")).lower() works fine.

Anatoly Kritskiy2022-02-08 07:51:13

status command. I enter the first character and an error is displayed. while True: time.sleep(0.01) response= str(input(">>>")).lower()

Boro8ey2022-02-08 07:51:13