Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lightcomc opened this issue Aug 17, 2022 · 3 comments
Open

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

lightcomc opened this issue Aug 17, 2022 · 3 comments

Comments

@lightcomc
Copy link

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
Copy link
Author

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

@lightcomc
Copy link
Author

ХРАНИЛИЩЕ.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
Copy link
Author

Resolved dpwe/audfprint#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 [email protected]
"""
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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant