fluencelabs / dev-rewards

Apache License 2.0
554 stars 368 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 23: invalid start byte #10

Closed Wmengti closed 4 months ago

Wmengti commented 4 months ago

Traceback (most recent call last): File "/claim/python/proof.py", line 157, in main() File "/claim/python/proof.py", line 141, in main sshPubKey, sshKeyPath = choose_ssh_key() File "/claim/python/proof.py", line 61, in choose_ssh_key if not is_ssh_key(path): File "/claim/python/proof.py", line 96, in is_ssh_key key = file.read() File "/usr/local/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x87 in position 23: invalid start byte

leo-web3 commented 4 months ago
def choose_ssh_key():
    files = []
    try:
        files = os.listdir(SSH_KEYS_DIR)
    except FileNotFoundError:
        pass

    sshKeys = []
    for f in files:
        if f == '.DS_Store':
            continue
        path = os.path.join(SSH_KEYS_DIR, f)
        if not is_ssh_key(path):
            continue
        sshKeys.append(path)
Wmengti commented 4 months ago

the same problem you meet ? I have tried this but it is still not work

leo-web3 commented 4 months ago

Modify the code here

Wmengti commented 4 months ago

thanks. it works, but new problem with "Specified SSH key is not eligible for claiming. Only RSA and Ed25519 keys are supported for proof generation."