question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

albumtypes is converted from a string to a list of individual characters

See original GitHub issue

Problem

After importing new files I will run beet update. Some of the tracks will have the albumtypes ‘transformed’ from a string (album) to a list of character (['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']). The albumtype field will become a single character (album -> a)

I could not get the output with -vv because it doesn’t seem to happen everytime. I deleted albums that previous triggered this problem and the problem didn’t repeat on import and update again.

$ beet update

Led to this problem:

Ghost - Ceremony and Devotion - Square Hammer
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - From the Pinnacle to the Pit
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Con clavi con dio
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Per aspera ad inferi
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Elizabeth
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Body and Blood
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Devil Church
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Cirice
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Ghuleh / Zombie Queen
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Year Zero
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Spöksonat
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - He Is
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Mummy Dust
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Secular Haze
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Absolution
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Ghost - Ceremony and Devotion - Ritual
  albumtypes: album; live -> ['a', 'l', 'b', 'u', 'm', ';', ' ', 'l', 'i', 'v', 'e']
  albumtype: live -> a
Arch Enemy - Wages of Sin - Enemy Within
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Arch Enemy - Wages of Sin - Burning Angel
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Arch Enemy - Wages of Sin - Heart of Darkness
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Arch Enemy - Wages of Sin - Ravenous
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Arch Enemy - Wages of Sin - Savage Messiah
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Hard Core
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Paint It Black
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Enter the Storm
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Fuel Me Up
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Extinct
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Baptizm of Fire
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - The Healer
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a
Glenn Tipton - Baptizm of Fire - Cruise Control
  albumtypes: album -> ['a', 'l', 'b', 'u', 'm']
  albumtype: album -> a

Setup

  • OS: Gentoo Linux (6.0.3-gentoo-x86_64)
  • Python version: 3.10.8
  • beets version: 1.6.0
  • Turning off plugins made problem go away (yes/no): don’t know: I don’t have the albumtypes plugin in my config.

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    auto: yes
    force: yes
    fallback: ''
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    local: no
    sources:
    - google
    - musixmatch
    - genius
    - tekstowo
library: /home/mcarpentier/Music/.beets/BeetMusicLibrary.blb
directory: /home/mcarpentier/Music

ui:
    color: yes
    colors:
        text_success: green
        text_warning: yellow
        text_error: red
        text_highlight: red
        text_highlight_minor: lightgray
        action_default: turquoise
        action: blue

import:
    copy: no
    write: yes
    move: yes

plugins: embedart fetchart info lyrics
embedart:
    auto: yes
    maxwidth: 0
    compare_threshold: 0
    ifempty: no
    remove_art_file: no
    quality: 0

paths:
    default: $albumartist/$album%aunique{}/$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title
fetchart:
    auto: yes
    minwidth: 0
    maxwidth: 0
    quality: 0
    max_filesize: 0
    enforce_ratio: no
    cautious: no
    cover_names:
    - cover
    - front
    - art
    - album
    - folder
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    lastfm_key: REDACTED
    store_source: no
    high_resolution: no
    deinterlace: no
    cover_format:

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mkhlcommented, Dec 15, 2022

Anyone know if there’s a good way to remediate files affected by this bug?

this issue itself only affects the files, so the fix would be to beet write affected files with a fixed version

what you’re asking is how to fix the database once one has affected some files and then beet updated their info so now the database is affected too (just wanna be super clear on that because i haven’t before and this can be really confusing 😃

if you can’t easily autotag the files, which would fix them you can instead use beet modify:

beet mod -a 'For Those That Wish to Exist at Abbey Road' albumtypes='album; l
ive'

this will show you the changes and let you confirm them, and will then by default update both the database and the files (look at the --help output for other options)

1reaction
wesley7502commented, Nov 27, 2022

I’ll also try taking a look at it too!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python | Split string into list of characters - GeeksforGeeks
This approach uses list comprehension to convert each character into a list. Using the following syntax you can split the characters of a...
Read more >
How to convert each character of a string into individual ...
6. Try printing b · 5. Simply b = list(a) · 1. Although your approach may be an overkill it is still very...
Read more >
Characters - Wolfram Language Documentation
Characters ["string"] gives a list of the characters in a string.
Read more >
convert a string into a list of characters (single ... - gists · GitHub
convert a string into a list of characters (single character strings) and back in python. ... assert isinstance(string, str ), "parameter is not...
Read more >
String - Robot Framework
Split the string to words from whitespace characters (spaces, newlines, ... the list contains tuples that contain individual group contents.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found