beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.68k stars 1.81k forks source link

Windows Powershell not displaying colors #2766

Closed Oyashirox closed 6 years ago

Oyashirox commented 6 years ago

Problem

I just upgraded beets from I believe was 1.2.+ to 1.4.6, and now powershell does not display colors and gives some unreadable garbage output. It was working fine before upgrading.

Running this command in verbose (-vv) mode:

$ beet import 'Kno - Death Is Silent'

Led to this problem:

URL:
    https://musicbrainz.org/release/65ee731c-5c3c-47e9-a324-dcf9ac6aeac7
(Similarity: 76.9%) (tracks, unmatched tracks) (CD, 2010, US)
 * If You Cry f. Natti ->
   If You Cry (title)
 * Loneliness f. Nemo Achida & Deacon The Villain ->
   Loneliness (title)
 * La Petite Mort (Come Die With Me) ->
   La petite mort (Come Die With Me)
 * Rhythm Of The Rain (Thomax Remix) (#14) ->
   Rhythm of the Rain (#5) (index, title)
 * Spread Your Wings f. Deacon The Villain ->
   Spread Your Wings (title)
 * Graveyard f. Sheisty Khrist ->
   Graveyard (title)
 * I Wish I Was Dead f. Tonedeff ->
   I Wish I Was Dead (title)
 * They Told Me f. Deacon The Villain ->
   They Told Me (title)
 * When I Was Young f. Natti & Substantial ->
   When I Was Young (title)
 * Not At The End f. Tunji ->
   Not at the End (title)
Unmatched tracks (1):
 ! Rhythm Of The Rain f. Thee Tom Hardy & Tunji (#5) (4:33)
[A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort?

Setup

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    google_API_key: REDACTED
    sources: google lyricwiki lyrics.com musixmatch
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no
directory: N:\Musique\beet
library: N:\Musique\beets-database.db

import:
    move: yes
    write: yes

plugins: inline lyrics

paths:
    singleton: $artist/$title
    albumtype:soundtrack: Soundtracks/$album/$track $title
pathfields: {}
item_fields: {}
album_fields: {}
jackwilsdon commented 6 years ago

This sounds like it could be similar to #2607. Is colorama installed on your system? What's the output from this command?

python -c "import colorama; colorama.init()"
Oyashirox commented 6 years ago

Yep, it seems to be the same problem. Pip says colorama is already installed, and the instruction you gave completes without any return value.

jackwilsdon commented 6 years ago

Try putting this in a file and running it with Python in PowerShell;

from colorama import init, Fore, Back, Style
init()
print(Fore.RED + 'Red')
print(Fore.GREEN + 'Green')
print(Fore.BLUE + 'Blue')
print(Style.RESET_ALL)
Oyashirox commented 6 years ago

Text is correctly colored

sampsyo commented 6 years ago

Indeed; this is an instance of https://github.com/beetbox/beets/issues/2607. Colorama does not work with the way we print bytes to the console on Python 3, and, unfortunately, there’s no clear way to work around this at the moment.