nrg101 / musicscan

Scan music collection for comparison to online databases
90 stars 15 forks source link

error processing torrents #24

Closed PnoT closed 5 years ago

PnoT commented 5 years ago

I'm running into an issue when processing a torrent towards a folder:

Traceback (most recent call last):
  File "musicscan-cli", line 449, in <module>
    main()
  File "musicscan-cli", line 440, in main
    process_release(release, api, music_threshold, processed_dirs, max_search_results)
  File "musicscan-cli", line 228, in process_release
    release_searched_ids, max_search_results, **search_fields)
  File "musicscan-cli", line 114, in search_and_match
    print("----- torrent filePath: {0}".format(torrent_filepath_unescaped))
  File "/root/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
    self.__convertor.write(text)
  File "/root/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 164, in write
    self.wrapped.write(text)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 39-40: ordinal not in range(128)

Here is another example of a torrent being checked on a completely different folder:

Traceback (most recent call last):
  File "musicscan-cli", line 449, in <module>
    main()
  File "musicscan-cli", line 440, in main
    process_release(release, api, music_threshold, processed_dirs, max_search_results)
  File "musicscan-cli", line 228, in process_release
    release_searched_ids, max_search_results, **search_fields)
  File "musicscan-cli", line 104, in search_and_match
    torrent_plural = "torrent" if len(group_torrents) == 1 else "torrents"
  File "/root/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 41, in write
    self.__convertor.write(text)
  File "/root/.local/lib/python3.6/site-packages/colorama/ansitowin32.py", line 164, in write
    self.wrapped.write(text)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 20: ordinal not in range(128)
PnoT commented 5 years ago

I fixed a few of my environment variables and this is now solved.