Errors in Beets docker container log

Hi, I have some errors after creating a Beets container using the following docker compose file in Portainer on OMV.

version: “2.1”
services:
beets:
image: ghcr.io/linuxserver/beets
container_name: beets
environment:
- PUID=1000
- PGID=100
- TZ=Europe/London
volumes:
- /srv/dev-disk-by-uuid-fe67e6c5-4649-4be6-b3cc-95368193db33/appdata/beets/config:/config
- /srv/dev-disk-by-uuid-ebe1edad-4a15-4064-b2ad-f2e30c8fbbde/beets_output:/music
- /srv/dev-disk-by-uuid-ebe1edad-4a15-4064-b2ad-f2e30c8fbbde/music:/downloads
ports:
- 8337:8337
restart: unless-stopped

These are the errors:
get_path_formats(),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 619, in get_path_formats,
path_formats.append((query, template(view.as_str()))),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 571, in template,
return Template(fmt),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 581, in init,
self.compiled = self.translate(),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 614, in translate,
func = compile_func(,
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 155, in compile_func,
prog = compile(mod, ‘’, ‘exec’),
ValueError: Name node can’t be used with ‘None’ constant,
Traceback (most recent call last):,
File “/usr/bin/beet”, line 33, in ,
sys.exit(load_entry_point(‘beets==1.4.9’, ‘console_scripts’, ‘beet’)()),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1266, in main,
_raw_main(args),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1249, in _raw_main,
subcommands, plugins, lib = _setup(options, lib),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1144, in _setup,
lib = _open_library(config),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1201, in _open_library,
get_path_formats(),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 619, in get_path_formats,
path_formats.append((query, template(view.as_str()))),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 571, in template,
return Template(fmt),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 581, in init,
self.compiled = self.translate(),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 614, in translate,
func = compile_func(,
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 155, in compile_func,
prog = compile(mod, ‘’, ‘exec’),
ValueError: Name node can’t be used with ‘None’ constant,
Traceback (most recent call last):,
File “/usr/bin/beet”, line 33, in ,
sys.exit(load_entry_point(‘beets==1.4.9’, ‘console_scripts’, ‘beet’)()),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1266, in main,
_raw_main(args),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1249, in _raw_main,
subcommands, plugins, lib = _setup(options, lib),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1144, in _setup,
lib = _open_library(config),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1201, in _open_library,
get_path_formats(),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 619, in get_path_formats,
path_formats.append((query, template(view.as_str()))),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 571, in template,
return Template(fmt),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 581, in init,
self.compiled = self.translate(),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 614, in translate,
func = compile_func(,
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 155, in compile_func,
prog = compile(mod, ‘’, ‘exec’),
ValueError: Name node can’t be used with ‘None’ constant,
Traceback (most recent call last):,
File “/usr/bin/beet”, line 33, in ,
sys.exit(load_entry_point(‘beets==1.4.9’, ‘console_scripts’, ‘beet’)()),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1266, in main,
_raw_main(args),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1249, in _raw_main,
subcommands, plugins, lib = _setup(options, lib),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1144, in _setup,
lib = _open_library(config),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1201, in _open_library,
get_path_formats(),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 619, in get_path_formats,
path_formats.append((query, template(view.as_str()))),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 571, in template,
return Template(fmt),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 581, in init,
self.compiled = self.translate(),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 614, in translate,
func = compile_func(,
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 155, in compile_func,
prog = compile(mod, ‘’, ‘exec’),
ValueError: Name node can’t be used with ‘None’ constant,
Traceback (most recent call last):,
File “/usr/bin/beet”, line 33, in ,
sys.exit(load_entry_point(‘beets==1.4.9’, ‘console_scripts’, ‘beet’)()),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1266, in main,
_raw_main(args),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1249, in _raw_main,
subcommands, plugins, lib = _setup(options, lib),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1144, in _setup,
lib = _open_library(config),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 1201, in _open_library,
get_path_formats(),
File “/usr/lib/python3.8/site-packages/beets/ui/init.py”, line 619, in get_path_formats,
path_formats.append((query, template(view.as_str()))),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 571, in template,
return Template(fmt),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 581, in init,
self.compiled = self.translate(),
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 614, in translate,
func = compile_func(,
File “/usr/lib/python3.8/site-packages/beets/util/functemplate.py”, line 155, in compile_func,
prog = compile(mod, ‘’, ‘exec’),
ValueError: Name node can’t be used with ‘None’ constant,

I’ve ensured the user related to the PUID and GUID in the compose file exists and has ownership of the directories.

I’m at a loss and not sure what else I can check, any suggestions are welcome.

Thanks

The current release of Beets is incompatible with the version of Python in the container. If you use the nightly tag for the container it works.

See Update to python 3.8.10 breaks image on Raspberry Pi · Issue #80 · linuxserver/docker-beets · GitHub

Thanks, but problem remains.

I tried using the nightly build by updating the docker compose file with the nightly tag and I got the same errors.

I removed all beets images and pulled the nightly build but still got the same errors.

I’m going through the comments in Issue #80 to see what/if I’ve missed something.

I’ve looked through the comments in Issue #80 but not found anything that helps me with running a Beets docker image without the above errors on an x86 platform.

@trolley I’m not running this on a Raspberry Pi, if that’s relevant to the advice you offered.

I’m not either. I’m on Ubuntu 20.04. All I had to do to fix it was add :nightly to image in my config and run compose again.

Perhaps the problem is specific to Portainer on OMV. I’ve updated OMV and pulled the nighly build of beets and no luck. Guess I’ll have to work around it.

Thanks for your suggestion though.

I’m wondering if anyone has got the beets docker image working within OMV. If they have then I’ll persevere

omv is just debian which we test all our images on, since you mention you run portainer, that is probably your issue. Use docker-compose or docker cli and it will likely work for you. We do not support or recommend portainer for deployment of our images at all.

1 Like

@Captain I was struggling with the same issue as you but just got it to work.

On my x86 server I also run OpenMediaVault (OMV5, so Debian Buster) and using Portainer to manage an array of docker images. Beets had been running nicely in the cointainer from Linuxserver.io for some time, until a container update broke the image. I only noticed it after a while later because the update was done automatically via Watchtower. (I know it’s not reccomended by the kind people at Linuxserver.io, but it helps me stay up to date on other security patches without much active server management.)

I had the same python 3.8 errors and had been struggling to get beets working again. After reading this thread I added the :nightly tag to the docker-compose stack in portainer like so:

image: ghcr.io/linuxserver/beets:nightly

After that beets worked again as expected, on OMV5 with Portainer, beets version reports:

beets version 1.5.0
Python version 3.8.10

Hopefully the python patch gets merged into a new release of the container soon.

Thanks @mdr-github I’ve done the same as you suggested and it’s not working for me, although the fact you’ve got it working has given me hope. I understand from @driz that using Portainer is not a supported or recommended method for deployment of Linuxserver.io images

Within Portainer I’ve created a single stack called Beets and I’ve used the following, does your compose file look similar/same?

version: “2.1”
services:
beets:
image: ghcr.io/linuxserver/beets:nightly
container_name: beets
environment:
- PUID=1001
- PGID=100
- TZ=Europe/London
volumes:
- /srv/dev-disk-by-uuid-fe67e6c5-4649-4be6-b3cc-95368193db33/appdata/beets/config:/config:rw
- /srv/dev-disk-by-uuid-ebe1edad-4a15-4064-b2ad-f2e30c8fbbde/beets_output:/music:rw
- /srv/dev-disk-by-uuid-ebe1edad-4a15-4064-b2ad-f2e30c8fbbde/music:/downloads:rw
ports:
- 8337:8337
restart: unless-stopped

I’m not sure what else I can change.

Hi @Captain, I have the same setup. Beets is in a Portainer stack with a single container like so:

---
version: '2.1'
services:
  beets:
    image: ghcr.io/linuxserver/beets:nightly
    container_name: beets
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Amsterdam
    volumes:
      - /srv/dev-disk-by-label-ssd/appdata/beets:/config
      - /srv/dev-disk-by-label-data1/audio/music:/music
      - /srv/dev-disk-by-label-ssd/download:/downloads
    ports:
      - 8337:8337/tcp
    restart: unless-stopped

Some things you can try troubleshooting:

  • try including the dashes on the first line and changing quotes around the version 2.1
  • check file and directory permissions. Do they match the PUID? File permissions can be a source of problems on OMV if not managed properly
  • I use disk labels rather than UUID to reference directories, shouldn’t matter but looks nicer :wink: the :rw tag is not required
  • try running the stack again with a new empty beets directory, created beforehand with the right permissions

I’m no docker expert at all, but to me Portainer is just a nice UI over docker and a stack is docker-compose (docker experts, feel free to correct my ignorance). Just like OMV is just a nice UI for Debian used as a NAS or home server. So using Portainer shouldn’t matter, but if you’re confortable enough using Debian GNU/Linux you can always ssh to the server and use docker-compose via commandline to test if that works for you.

portainer only uses docker-compose in the newest versions (and only for x86_64) and still causes a ton of compatibility issues with way it handles things. It’s not something we will ever support deployment of containers with (though using it to view things is fine)

That said, beets isn’t a container that SHOULD have a problem, but again, we dont support portainer deployment so i will just say, if you can reproduce the original OP issue using docker-compose, we can definitely take a look at it.