Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

during pluginload ... Name node can't be used with 'None' constant #3674

Closed
rmNULL opened this issue Jul 18, 2020 · 10 comments
Closed

during pluginload ... Name node can't be used with 'None' constant #3674

rmNULL opened this issue Jul 18, 2020 · 10 comments

Comments

@rmNULL
Copy link

rmNULL commented Jul 18, 2020

Problem

running beet <any command> crashes

ValueError: Name node can't be used with 'None' constant

Running this command in verbose (-vv) mode:

$ beet -vv help

Led to this problem:

user configuration: /home/rmnull/.config/beets/config.yaml
data directory: /home/rmnull/.config/beets
plugin paths: 
Sending event: pluginload
Traceback (most recent call last):
  File "/home/rmnull/.local/bin/beet", line 8, in <module>
    sys.exit(main())
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/ui/__init__.py", line 1266, in main
    _raw_main(args)
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/ui/__init__.py", line 1249, in _raw_main
    subcommands, plugins, lib = _setup(options, lib)
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/ui/__init__.py", line 1144, in _setup
    lib = _open_library(config)
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/ui/__init__.py", line 1201, in _open_library
    get_path_formats(),
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/ui/__init__.py", line 619, in get_path_formats
    path_formats.append((query, template(view.as_str())))
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/util/functemplate.py", line 571, in template
    return Template(fmt)
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/util/functemplate.py", line 581, in __init__
    self.compiled = self.translate()
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/util/functemplate.py", line 614, in translate
    func = compile_func(
  File "/home/rmnull/.local/lib/python3.8/site-packages/beets/util/functemplate.py", line 155, in compile_func
    prog = compile(mod, '<generated>', 'exec')
ValueError: Name node can't be used with 'None' constant

Here's a link to the music files that trigger the bug (if relevant):

Setup

  • OS: Linux eos 5.7.9_1 #1 SMP Thu Jul 16 10:02:50 UTC 2020 x86_64 GNU/Linux
  • Python version: 3.8.4
  • beets version: 1.4.9(referred from pip list, beet --version crashes)
  • Turning off plugins made problem go away (yes/no): no

My configuration (output of beet config) is:
beet config crashes with the same error mentioned above.
However beet config -e works fine

directory: /tmp/Music/
library: /tmp/Music/beets_library.db
import:
  move: no

Other Notes

The problem persists on reinstall

$ pip3 uninstall beets
$ pip3 install beets
$ beet help  # same crash

I don't see this as a problem in beets,
There was no problem installing beets in docker.
Clarification: Asking it as a question to have this issue resolved rather than pointing it as bug in beets.

@wisp3rwind
Copy link
Member

wisp3rwind commented Jul 18, 2020

See #3621 and #3625

@rmNULL
Copy link
Author

rmNULL commented Jul 18, 2020

@wisp3rwind thanks

@noodle-
Copy link

noodle- commented Oct 6, 2020

Any workaround while we wait for the next release?

@jackwilsdon
Copy link
Member

Running the latest source version of beets is probably the simplest option for the time being.

@AssenD
Copy link

AssenD commented Oct 25, 2020

64bit W10, 64bit Py3.9.0, beets version 1.4.9 - same problem

@jackwilsdon
Copy link
Member

@AssenD please see #3621 and #3625 (as mentioned in this comment).

@davidheijkamp
Copy link

A simple workaround on my Ubuntu machine was to force a specific version of python by changing the shebang in ~/.local/bin/beet from:

#!/usr/bin/python3

to:

#!/usr/bin/python3.6

Probably 3.7 would work as well, if that version of Python is installed on your machine.

@wisp3rwind
Copy link
Member

Probably 3.7 would work as well, if that version of Python is installed on your machine.

Yeah, most likely, the relevant Python change wasn't backported to 3.7 as far as I can tell.

@adamjakab
Copy link
Contributor

Probably 3.7 would work as well, if that version of Python is installed on your machine.

Yes, I confirm that it will run with Python 3.7. (Linux jMac 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux) You can easily set up a (mini)conda environment with that specific version version without having to tamper with Python on the OS level.

@themana
Copy link

themana commented Jun 11, 2021

Anyone running the docker container from Linuserver.io that is still getting the error if you switch to the nightly build seems to work as a temporary fix until this gets patched in the stable version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants