Skip to content

codec can't encode character #5

@janverm

Description

@janverm

When importing my music, the addSong function triggered an exception when importing some Ogg Vorbis files with unicode characters:

  File "/usr/lib/python3.6/site-packages/bard-0.1.0-py3.6-linux-x86_64.egg/bard/musicdatabase.py", line 199, in addSong
    print(values[0][3:])
UnicodeEncodeError: 'ascii' codec can't encode character '\xa5' in position 35: ordinal not in range(128)

Please update the code to either ignore the non-ascii unicode chars or implement all strings in database as unicode strings.
( yourstring.encode('ascii', 'ignore').decode('ascii') )

See also:
https://docs.python.org/3.6/howto/unicode.html#python-s-unicode-support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions