mitin001 / audfprint-gui

GUI for audfprint
6 stars 2 forks source link

'charmap' codec can't encode character '\xb4' #2

Open lightcomc opened 2 years ago

lightcomc commented 2 years ago

Thank you for this opportunity for all audiophiles, maybe it will help us find something we couldn't find for years without using Shazam

Process stopped after

Error: UnicodeEncodeError: 'charmap' codec can't encode character '\xb4' in position 177: character maps to

And Russian characters Showing as ���������. in python fingerprinting script.

Maybe this is a solution (I am far from python programming): https://stackoverflow.com/questions/58537889/python-xb4-encoding-issue

I would also like to add a wish: Add the ability to enable/disable auto-scrolling at the bottom. (I forgot to put more load on the processor and now I can not go there because autoscroll works)

lightcomc commented 2 years ago

also getting some error on folder name - Losing Control Ultimate Trance Selection (2013)[Mp3][www.lokotorrents.com]

lightcomc commented 2 years ago

ХРАНИЛИЩЕ.txt in databaseы folder:

Error: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\test\AppData\Roaming\audfprint-gui\databases\���������.pklz'

The scanned folder had a Cyrillic name ХРАНИЛИЩЕ A scan of 42895 files total hours ended with an error that the charset was not supported.

lightcomc commented 1 year ago

Resolved https://github.com/dpwe/audfprint/issues/86

From
https://stackoverflow.com/questions/5419/python-unicode-and-the-windows-console/32176732#32176732
it appears that

py -m pip install win-unicode-console

may alter the python install in such a way as to avoid this error going
forward (without changes to audfprint code).

  DAn.

OR

import sys
sys.stdout.reconfigure(encoding='utf-8')

#!/usr/bin/python
# coding=utf-8
"""
audfprint.py

Implementation of acoustic-landmark-based robust fingerprinting.
Port of the Matlab implementation.

2014-05-25 Dan Ellis dpwe@ee.columbia.edu
"""
exec('from __future__ import division, print_function')

# For reporting progress time...
...

also with this -replacements addtions works fine

Added import sys sys.stdout.reconfigure(encoding='utf-8')

And Replaced from future import division, print_function to exec('from future import division, print_function')