remy icon indicating copy to clipboard operation
remy copied to clipboard

Unable to connect, charmap codec can't decode byte

Open Jayy001 opened this issue 1 year ago • 5 comments

Hello!

Lovely tool here, however sadly I cannot seem to connect to my RM2 - 2.14.1.866 [Toltec installed, no DDVK hacks]

image

....and the config file:

"default_source": false,
    "sources": {
        "default": {
            "name": "reMarkable",
            "hidden": false,
            "type": "ssh",
            "host": "10.11.99.1",
            "username": "root",
            "host_key_policy": "ask",
            "timeout": 3,
            "use_banner": false,
            "password": "XXXXXXXXXXX",
            "enable_webui_export": false
        }
    },

Log output for debuggingg:

[I] STARTING: Thu Sep 15 17:34:05 2022
[I] Configuration loaded from C:\Users\Jacob\AppData\Local\remy\remy\config.json.
[I] Using known hosts file: C:\Users\Jacob\AppData\Local\remy\remy\known_hosts
[I] Loaded known hosts from C:\Users\Jacob\AppData\Local\remy\remy\known_hosts
[I] Connecting...
[I] Connected to 10.11.99.1
[E] RETRY? ['charmap' codec can't decode byte 0x8d in position 3936: character maps to <undefined>]
[I] Configuration at 'C:\Users\Jacob\AppData\Local\remy\remy\config.json'
[I] Waiting for stray threads
[I] Done waiting
[I] QUITTING: Thu Sep 15 17:34:08 2022

Jayy001 avatar Sep 15 '22 16:09 Jayy001

That's a strange error, something is choking on some unexpected character in some string. Could you try again, this time setting in your configuration "log_verbosity": "debug"?

bordaigorl avatar Sep 15 '22 19:09 bordaigorl

image

Sorry for the extremally long wait time, here are the debug logs.

Jayy001 avatar Sep 26 '22 18:09 Jayy001

Hi again, I seem to have fixed the issue:

I changed in remy/remarkable/filesource.py line 225 from:

with open(self._local("templates.json", branch=TEMPLDIR), 'r') as f:

to...

with open(self._local("templates.json", branch=TEMPLDIR), 'r', encoding="utf-8") as f:

Which seem to have done the trick! Will report back with any other issues I find

Jayy001 avatar Sep 26 '22 18:09 Jayy001

Ah! Fixing the encoding is probably a good idea. Have you customized the templates or are they just the default ones?

bordaigorl avatar Sep 26 '22 19:09 bordaigorl

Ah! Fixing the encoding is probably a good idea. Have you customized the templates or are they just the default ones?

I believe I remember adding the template-cartesian-graph with Toltec which probably caused the re-encoding.

Jayy001 avatar Sep 26 '22 19:09 Jayy001