Serial monitor exception

Hi all
when I start the serial monitor and something goes wrong I read this message:
--- Miniterm on /dev/ttyUSB0 9600,8,N,1 ------ Quit: Ctrl+C | Menu: Ctrl+T | - Pastebin.com
I think that is about some strange characters sent during debug,absolutely my mistakes and/or connections on the fly but it would be fine if the monitor could go ahead anyway…

Could you share your platformio.ini?

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:attiny]
platform = atmelavr
framework = arduino
board = attiny85
upload_flags = -P$UPLOAD_PORT
upload_port = /dev/ttyACM0
upload_protocol = stk500v1

or

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = arduino

What is your locale?

from platformio terminal:

sergio@debian:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=it_IT.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES=“en_US.UTF-8”

LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

We have just updated our IDEs and fixed some issue related to OS’s locales. Could you try the latest PlatformIO IDE for VSCode?

Made a fresh install,PlatformIO IDE for VSCode works fine here ,but I still get the serial monitor error (doing something really bad as unplugging wires during communication).

Exception in thread rx:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “/home/sergio/.platformio/penv/local/lib/python2.7/site-packages/serial/tools/miniterm.py”, line 453, in reader
self.console.write(text)
File “/home/sergio/.platformio/penv/local/lib/python2.7/site-packages/serial/tools/miniterm.py”, line 68, in write
self.output.write(text)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\ufffd’ in position 0: ordinal not in range(128)