JSON data not loaded due to bad text encoding #100

Closed
opened 2019-03-12 12:20:46 -06:00 by 2Shirt · 0 comments
2Shirt commented 2019-03-12 12:20:46 -06:00 (Migrated from gitea.2shirt.work)

This error was being silenced when decoding the output from lsblk in hw_diags.py > DiskObj > get_details() function:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 243: invalid start byte

Need to change json.loads(result.stdout.decode()) calls to json.loads(result.stdout.decode('utf-8', errors='ignore')) Better to have incomplete data than no data IMO

This error was being silenced when decoding the output from lsblk in hw_diags.py > DiskObj > get_details() function: >UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 243: invalid start byte Need to change `json.loads(result.stdout.decode())` calls to `json.loads(result.stdout.decode('utf-8', errors='ignore'))` Better to have incomplete data than no data IMO
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: 2Shirt/WizardKit#100
No description provided.