@אלף-שין כתב בבירור | מיון קבצים מרובים לפי שמות:
@NH-LOCAL
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Home\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1255.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'charmap' codec can't decode byte 0x9c in position 53: character maps to <undefined> >>>
נראה שהבעיה בכלל לא בקוד עצמו. אתה צריך פשוט להמיר את הפורמט של קובץ הפייתון. סביר להניח שכרגע הוא אנסי או הפוך