Roomba980-Python icon indicating copy to clipboard operation
Roomba980-Python copied to clipboard

Can't encode character

Open don-reba opened this issue 1 year ago • 0 comments

The scripts are unable to create config.ini. It looks like they are stumbling on Unicode characters in the vacuum's name.

[2024-06-02 14:10:38,085][ INFO](Roomba.Password     ) 0 robot(s) already defined in file./config.ini, found 1 robot(s) on network
--- Logging error ---
Traceback (most recent call last):
  File "C:\Python\Lib\logging\__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
  File "C:\Python\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u1ea5' in position 112: character maps to <undefined>
Call stack:
  File ".\roomba.py", line 2424, in <module>
    main()
  File ".\roomba_direct.py", line 384, in main
    roombas = get_passwd.get_roombas()
  File ".\password.py", line 251, in get_roombas
    self.get_password()
  File ".\password.py", line 142, in get_password
    self.log.info("To add/update Your robot details,"
Message: 'To add/update Your robot details,make sure your robot (Trấn Xìn) at IP 10.0.0.88 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.'
Arguments: ()
[2024-06-02 14:10:38,085][ INFO](Roomba.Password     ) To add/update Your robot details,make sure your robot (Trấn Xìn) at IP 10.0.0.88 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.
Press <Enter> to continue...
s<Enter> to skip configuring this robot: dir
--- Logging error ---
Traceback (most recent call last):
  File "C:\Python\Lib\logging\__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
  File "C:\Python\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u1ea5' in position 65: character maps to <undefined>
Call stack:
  File ".\roomba.py", line 2424, in <module>
    main()
  File ".\roomba_direct.py", line 384, in main
    roombas = get_passwd.get_roombas()
  File ".\password.py", line 251, in get_roombas
    self.get_password()
  File ".\password.py", line 159, in get_password
    self.log.info("Roomba ({}) IP address is: {}".format(robotname, addr))
Message: 'Roomba (Trấn Xìn) IP address is: 10.0.0.88'
Arguments: ()
[2024-06-02 14:10:50,322][ INFO](Roomba.Password     ) Roomba (Trấn Xìn) IP address is: 10.0.0.88
Traceback (most recent call last):
  File ".\roomba.py", line 2424, in <module>
    main()
  File ".\roomba_direct.py", line 384, in main
    roombas = get_passwd.get_roombas()
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\password.py", line 251, in get_roombas
    self.get_password()
  File ".\password.py", line 160, in get_password
    data = self.get_password_from_roomba(addr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\password.py", line 196, in get_password_from_roomba
    wrappedSocket = context.wrap_socket(sock)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\ssl.py", line 455, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python\Lib\ssl.py", line 970, in _create
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

don-reba avatar Jun 02 '24 21:06 don-reba