[Plugin] pirate audio

Rapberry Pi Zero W
Voumio System Verion 2.882
Nothing else connected.
No other plugins are installed.

The install is about 2 weeks old.
After install i added my Nas as a music storage.
It ran with a usb dac for the first week while waiting for my Pirate Audio board.
I may try another fresh install on another sdcard if i have one.
I have a 3a board available also.

Just tried a full fresh sdcard install
Same problem at sudo pip install socketIO-client

volumio@zero:~$ sudo pip install socketIO-client
[sudo] password for volumio:
Downloading/unpacking socketIO-client
  Downloading socketIO-client-0.7.2.tar.gz
  Running setup.py (path:/tmp/pip-build-534_n7/socketIO-client/setup.py) egg_info for package socketIO-client

    warning: no files found matching '*.html'
    warning: no files found matching '*.js'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking requests>=2.7.0 (from socketIO-client)
  Downloading requests-2.26.0-py2.py3-none-any.whl (62kB): 62kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2621, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 49, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'charset-normalizer ~=2.0.0', 'at', ' ~=2.0.0')

Storing debug log for failure in /root/.pip/pip.log

@Jayman,

i looks like the pip install is broken, please try:

  • login via ssh
  • sudo python -m pip install --upgrade --force setuptools
  • sudo python -m pip install --upgrade --force pip
  • Install socketIO-Client: sudo pip install socketIO-client
  • uninstall websocket-client with following command: sudo pip uninstall websocket-client
  • install a specific version of websocket-client with the following command: sudo pip install websocket-client==0.58.0
  • enable pirate audio plugin (via web GUI)
  • tell me the results

AxLED

Looks not so good…

 volumio@radio:~$ sudo python -m pip install --upgrade --force setuptools
Downloading/unpacking setuptools
  Downloading setuptools-57.4.0.tar.gz (2.1MB): 2.1MB downloaded
  Running setup.py (path:/tmp/pip-build-gjpJ0D/setuptools/setup.py) egg_info for package setuptools
    Traceback (most recent call last):
      File "<string>", line 3, in <module>
      File "setuptools/__init__.py", line 16, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 1367
        raise SyntaxError(e) from e
                                ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 3, in <module>

  File "setuptools/__init__.py", line 16, in <module>

    import setuptools.version

  File "setuptools/version.py", line 1, in <module>

    import pkg_resources

  File "pkg_resources/__init__.py", line 1367

    raise SyntaxError(e) from e

                            ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-gjpJ0D/setuptools
Storing debug log for failure in /root/.pip/pip.log
volumio@radio:~$ sudo python -m pip install --upgrade --force pip
Downloading/unpacking pip
  Downloading pip-21.2.3.tar.gz (1.6MB): 1.6MB downloaded
  Running setup.py (path:/tmp/pip-build-YtAOjw/pip/setup.py) egg_info for package pip
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-build-YtAOjw/pip/setup.py", line 7
        def read(rel_path: str) -> str:
                         ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-build-YtAOjw/pip/setup.py", line 7

    def read(rel_path: str) -> str:

                     ^

SyntaxError: invalid syntax

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-YtAOjw/pip
Storing debug log for failure in /root/.pip/pip.log
volumio@radio:~$ Install socketIO-Client: sudo pip install socketIO-client
-bash: Install: command not found
volumio@radio:~$ sudo pip install socketIO-client
Downloading/unpacking socketIO-client
  Downloading socketIO-client-0.7.2.tar.gz
  Running setup.py (path:/tmp/pip-build-bWYJSk/socketIO-client/setup.py) egg_info for package socketIO-client
    
    warning: no files found matching '*.html'
    warning: no files found matching '*.js'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking requests>=2.7.0 (from socketIO-client)
  Downloading requests-2.26.0-py2.py3-none-any.whl (62kB): 62kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2621, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 49, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'charset-normalizer ~=2.0.0', 'at', ' ~=2.0.0')

Storing debug log for failure in /root/.pip/pip.log
volumio@radio:~$ sudo pip uninstall websocket-client
Uninstalling websocket-client:
  /usr/local/bin/wsdump.py
  /usr/local/bin/wsdump.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/__init__.py
  /usr/local/lib/python2.7/dist-packages/websocket/__init__.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_abnf.py
  /usr/local/lib/python2.7/dist-packages/websocket/_abnf.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_app.py
  /usr/local/lib/python2.7/dist-packages/websocket/_app.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_cookiejar.py
  /usr/local/lib/python2.7/dist-packages/websocket/_cookiejar.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_core.py
  /usr/local/lib/python2.7/dist-packages/websocket/_core.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_exceptions.py
  /usr/local/lib/python2.7/dist-packages/websocket/_exceptions.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_handshake.py
  /usr/local/lib/python2.7/dist-packages/websocket/_handshake.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_http.py
  /usr/local/lib/python2.7/dist-packages/websocket/_http.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_logging.py
  /usr/local/lib/python2.7/dist-packages/websocket/_logging.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_socket.py
  /usr/local/lib/python2.7/dist-packages/websocket/_socket.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_ssl_compat.py
  /usr/local/lib/python2.7/dist-packages/websocket/_ssl_compat.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_url.py
  /usr/local/lib/python2.7/dist-packages/websocket/_url.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/_utils.py
  /usr/local/lib/python2.7/dist-packages/websocket/_utils.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/tests/__init__.py
  /usr/local/lib/python2.7/dist-packages/websocket/tests/__init__.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/tests/data/header01.txt
  /usr/local/lib/python2.7/dist-packages/websocket/tests/data/header02.txt
  /usr/local/lib/python2.7/dist-packages/websocket/tests/test_cookiejar.py
  /usr/local/lib/python2.7/dist-packages/websocket/tests/test_cookiejar.pyc
  /usr/local/lib/python2.7/dist-packages/websocket/tests/test_websocket.py
  /usr/local/lib/python2.7/dist-packages/websocket/tests/test_websocket.pyc
  /usr/local/lib/python2.7/dist-packages/websocket_client-0.58.0.dist-info/COPYING.LESSER
  /usr/local/lib/python2.7/dist-packages/websocket_client-0.58.0.dist-info/LICENSE
  /usr/local/lib/python2.7/dist-packages/websocket_client-0.58.0.dist-info/METADATA
  /usr/local/lib/python2.7/dist-packages/websocket_client-0.58.0.dist-info/RECORD
  /usr/local/lib/python2.7/dist-packages/websocket_client-0.58.0.dist-info/WHEEL
  /usr/local/lib/python2.7/dist-packages/websocket_client-0.58.0.dist-info/top_level.txt
Proceed (y/n)? y
  Successfully uninstalled websocket-client
volumio@radio:~$ sudo pip install websocket-client==0.58.0
Downloading/unpacking websocket-client==0.58.0
  Downloading websocket_client-0.58.0-py2.py3-none-any.whl (61kB): 61kB downloaded
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from websocket-client==0.58.0)
Installing collected packages: websocket-client
Successfully installed websocket-client
Cleaning up...
volumio@radio:~$

Umm, pip has dropped compatibility for Python 2.7 with the 21.0 versions.

So you need to pin your version to the last supported version 20.3 for Python 2.7.

Try doing a sanity check – on a fresh Volumio 2.x install, check what version of pip is installed

python -m pip --version

# if it's the wrong version,
# force it back to the right version 
python -m pip install --upgrade pip==20.3

Personally, I’d move to Python 3.x by using the Buster beta versions of Volumio.

Hi, any update on this problem?

I just did a fresh volumio install on rpi zero (using volumio-2.907-2021-07-02-pi.img.zip) and I have this issue:

volumio@xxx:/data/plugins/miscellanea/pirateaudio$ **python display.py**
Traceback (most recent call last):
  File "display.py", line 8, in <module>
    import ST7789 as ST7789
ImportError: No module named ST7789
volumio@xxx:/data/plugins/miscellanea/pirateaudio$

PIP reports version:

volumio@xx:/data/plugins/miscellanea/pirateaudio$ **pip --version**
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)

But manual install of socketIO-client does not work:

volumio@xxx:/data/plugins/miscellanea/pirateaudio$ **sudo pip install socketIO-client**

Downloading/unpacking socketIO-client
  Downloading socketIO-client-0.7.2.tar.gz
  Running setup.py (path:/tmp/pip-build-ihzyf9/socketIO-client/setup.py) egg_info for package socketIO-client

    warning: no files found matching '*.html'
    warning: no files found matching '*.js'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking requests>=2.7.0 (from socketIO-client)
  Downloading requests-2.26.0-py2.py3-none-any.whl (62kB): 62kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2401, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2597, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2621, in _compute_dependencies
    parsed = next(parse_requirements(distvers))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 49, in <lambda>
    next = lambda o: o.next()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'charset-normalizer ~=2.0.0', 'at', ' ~=2.0.0')

Storing debug log for failure in /root/.pip/pip.log

@miskor
i will try to adapt my plugin to a new volumio release based on buster if it is finally released. In the actual image i have some depencies on python 2.7 and pip and socketio client which makes my plugin not working anymore. Some workarounds are mentioned above. AxLED

@miskor @JanK I had the same problems as you on a volumio install with current version today on a Pi Zero W. I installed modules for websocket-client==0.58.0 and ST7789, but I couldn’t get pip to update from by any of the mentioned methods. I eventually went back to fundamentals and used get_pip. Note that for python, you need a particular version of get_pip. From my fresh install (after trying all the suggested methods for update)

$ pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
$ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
$ sudo python get-pip.py 
....
$ pip --version
pip 20.3.4 from /home/volumio/.local/lib/python2.7/site-packages/pip (python 2.7)

From there I could:

$ sudo pip install socketIO-client
....
Successfully installed certifi-2021.5.30 chardet-4.0.0 idna-2.10 requests-2.26.0 socketIO-client-0.7.2 urllib3-1.26.6

I don’t know if installing pip this way will mess anything else up, or packages will get out of order - I’m not a python or pip expert, but at least it gets the display to work!

@arckuk
good to hear you found a working workaround.
Thanks for sharing also.

As mentioned some posts ago i will try to adapt my plugin to a new volumio release based on buster if it is finally released. In the actual image i have some depencies on python 2.7 and pip and socketio client which makes my plugin not working anymore.

AxLED

1 Like