Skip to content
This repository was archived by the owner on Jan 22, 2022. It is now read-only.
This repository was archived by the owner on Jan 22, 2022. It is now read-only.

UnicodeEncodeError with logging when using Mobileclient Search #667

@gcfrxbots

Description

@gcfrxbots

New error popping up:

--- Logging error ---
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\logging\__init__.py", line 985, in emit
    stream.write(msg)
  File "C:\Program Files\Python37\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f49b' in position 32828: character maps to <undefined>

Call Stack:
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\mobileclient.py", line 1961, in search
    res = self._make_call(mobileclient.Search, query, max_results)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\mobileclient.py", line 48, in _make_call
    return super(Mobileclient, self)._make_call(protocol, *args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\clients\shared.py", line 90, in _make_call
    return protocol.perform(self.session, self.validate, *args, **kwargs)
  File "C:\Program Files\Python37\lib\site-packages\gmusicapi\protocol\shared.py", line 247, in perform
    log.debug(cls.filter_response(parsed_response))

Happens when calling mobileclient.search("test") and the encoding used for the string doesnt seem to affect it.

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