Set field to URL

I’m attempting to set a field on the CLI during import to a URL, and I’m getting 'supplied argument is not of the form key=value'. I’ve tried escaping the string, I’ve tried single and double quotes, all without luck.

Here’s an example you can use (it errors out during argument processing, so it doesn’t even check for the existence of the directory):

$ beet import --set import_dir='Example Artist - Example Album (2018)' --set permalink='' Example\ Artist\ \-\ Example\ Album\ \(2018\)
error: supplied argument `permalink=' is not of the form `key=value'

Hmm! Looks like our parser is being a little dumb—it’s probably confused by the second = in the value. Does it work if you remove that?

Removing the = from the URL allows the command to progress. Of course, now the URL is incorrect, so…

OK! Can you please file a bug? The command should totally be able to handle values with = in them. (We’d just use the first = as the separator.)


I import albums with a python tool using beets as a library, and for those I set this field if I have a value for it. During the import I log the album object returned during the process, and I can see the custom permalink field is there, with a = in the value. However, I don’t see the custom fields when I run beet info query for track name, and I can’t seem to search with beet ls

Is there a way to verify that the custom fields are set properly for the albums that auto-imported via python?

Awesome; thanks!

I think what you’re seeing is that the field is being set at the album level, not the track level. So you’ll want to do a beet ls -a to query and view it.

Aha, that did the trick. I didn’t realize it was only an album level field (it’s fine that it is though). Is there an equivalent of beet info for albums though? It says -a not a valid option with info.

Not yet: