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

NameError: name 'operatorPrecedence' is not defined #643

Closed
wazabees opened this issue Oct 31, 2021 · 5 comments
Closed

NameError: name 'operatorPrecedence' is not defined #643

wazabees opened this issue Oct 31, 2021 · 5 comments

Comments

@wazabees
Copy link

I am getting the error below trying to start Puddletag v2.0.1.

OS: Arch linux, 5.14.14-arch
Python 3.9.7

╰─❯ puddletag     
puddletag Version: 2.0.1
Locale: en_GB
Traceback (most recent call last):
  File "/usr/bin/puddletag", line 333, in <module>
    from puddlestuff.puddletag import MainWin
  File "/usr/lib/python3.9/site-packages/puddlestuff/puddletag.py", line 12, in <module>
    from . import mainwin
  File "/usr/lib/python3.9/site-packages/puddlestuff/mainwin/__init__.py", line 4, in <module>
    from . import dirview
  File "/usr/lib/python3.9/site-packages/puddlestuff/mainwin/dirview.py", line 12, in <module>
    from ..tagmodel import has_previews
  File "/usr/lib/python3.9/site-packages/puddlestuff/tagmodel.py", line 31, in <module>
    from .audio_filter import parse as filter_audio
  File "/usr/lib/python3.9/site-packages/puddlestuff/audio_filter.py", line 183, in <module>
    bool_expr = operatorPrecedence(tokens, bool_exprs)
NameError: name 'operatorPrecedence' is not defined
@ArveMediaconnect
Copy link

ArveMediaconnect commented Nov 23, 2021

Seems like this operatorPrecedence thing was removed from pyparsing 3.

https://pyparsing-docs.readthedocs.io/en/latest/whats_new_in_3_0_0.html#id21

edit: Can confirm that changing 'operatorPrecedence' to 'infix_notation' in /usr/lib/python3.9/site-packages/puddlestuff/audio_filter.py makes puddletag work again for me.

@sandrotosi
Copy link
Member

@wazabees @ArveMediaconnect @gitdwarf can you tyr to edit /usr/lib/python3.9/site-packages/puddlestuff/audio_filter.py (it may require sudo) to replace operatorPrecedence with infixNotation and let me know if it works? thanks!

@sandrotosi sandrotosi added the more-information We need more information to properly address/understand the issue label Nov 29, 2021
@ArveMediaconnect
Copy link

As I mentioned, changing it to infix_notation worked for me, and as far as I understand it, infixNotation is just an alias for infix_notation, so should work the same (maybe even better, I don't know if infix_notation is available in older versions of pyparsing).

@gitdwarf
Copy link

Hi there
Yes, I can also confirm, that changing operatorPrecedence in
site-packages/puddlestuff/audio_filter.py
to EITHER
infix_notation
OR
infixNotation
both resolves the issue :)

@wazabees
Copy link
Author

Confirmed for me as well, replacing operatorPrecedence with infixNotation solved the issue. Thanks! :)

@sandrotosi sandrotosi removed the more-information We need more information to properly address/understand the issue label Dec 19, 2021
bernd-wechner pushed a commit to bernd-wechner/puddletag that referenced this issue Jan 22, 2022
bernd-wechner pushed a commit to bernd-wechner/puddletag that referenced this issue Jan 22, 2022
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

4 participants