Error running the pyAudioAnalysis sample program

198 Views Asked by At

I installed pyAudioAnalysis on python2.7 using pycharm (linux). Trying to run audioBasicIO.py gives the following error. I have installed eyeD3 but it does not work.

/usr/bin/python2.7 /usr/local/lib/python2.7/dist-packages/pyAudioAnalysis/audioBasicIO.py
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pyAudioAnalysis/audioBasicIO.py", line 6, in <module>
    import eyed3
  File "/home/.local/lib/python2.7/site-packages/eyed3/__init__.py", line 31, in <module>
    from .utils.log import log                                          # noqa: E402
  File "/home/.local/lib/python2.7/site-packages/eyed3/utils/__init__.py", line 361
    msg = f"invalid level choice: {level} (choose from {parser.log_levels})"
                                                                           ^
SyntaxError: invalid syntax

Is my installation incorrect? This is the first time I use this library, does anyone have any suggestions.

1

There are 1 best solutions below

0
On

f-strings aren't supported for python 2.7. You need python 3.6 or above to use them. Here is a good workaround, in which you can use f-strings in below python 3.6.