[Plugin] pirate audio

Thanks for the response, i will check USB support within the next days.
AxLED

Thanks guys for working the display issue out. I had the same problem and I got it fixed following your instructions. Thanks a lot !

Hi people.
I an trying to get the Pirate Audio working but have the issue listed above of having just a blank screen.
I have tried the ‘work arround’ listed above regarding the websocket client but still no display.
Audio out is working. Buttons do nothing. Backlight turns on breifly when booting.
Hope someone can help.

1 Like

@Jayman,

can you please try following.

  • Login via ssh to your pi
  • change directory: `cd /data/plugins/miscellanea/pirateaudio
  • python display.py`
  • execute display.py: python display.py
  • Post output

Regards

AxLED

AxLED thanks for your help.

volumio@beck:/data/plugins/miscellanea/pirateaudio$ python display.py
Traceback (most recent call last):
File “display.py”, line 9, in
from socketIO_client import SocketIO
ImportError: No module named socketIO_client
volumio@beck:/data/plugins/miscellanea/pirateaudio$

I am hardly a linux expert, quite a far way from it but i am sure that is a problem.

@Jayman,

so try the following
login your pi via ssh

  • try to install socket-io manually: sudo pip install socketIO-client
  • post output

AxLED

I disabled plugin first and ssh as your request, see below.

volumio@beck:~$ 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-5DUgxO/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
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 guess pip is broken, please try the following steps:

  • login via ssh
  • check if pip is correctly installed by command pip --version
  • if you get an error, fix it by command sudo easy_install -U pip and run pip --version again, now you should get an version information.
  • 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

Regards

AxLED

Having problems at Install socketIO-Client: sudo pip install socketIO-client

volumio@beck:~$ pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
volumio@beck:~$ 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-FAnjCx/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,

can you please provide following informations:

  • which raspberry pi
  • which version of volumio
  • anything else (except pirate audio dac and power supply) connected to pi?
  • anything else installed (which doesnt belong to the volumio cosmos)?

AxLED

1 Like

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!

1 Like

@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

2 Likes

hey, any news of update for volumio 2.909? just got pirate audio headphone and would love to use this plugin.