[Plugin] pirate audio

@AxLED, thanks for your workaround, but unfortunately this happened with Volumio 2.882:

volumio@volumiok:~$ sudo pip uninstall websocket-client
[sudo] password for volumio: 
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load
    ['__name__'])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in <module>
    from pip.download import path_to_url
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in <module>
    from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead

@tigger-gg

i guess you are getting an error on command pip --version
If yes, please fix pip by command sudo easy_install -U pip and run pip --version again, now you should get an version information.

Then follow the workaround instructions:

  • disable pirate audio plugin (via web GUI)
  • login via ssh
  • 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

This is what happened during the plugin installation:

May 24 14:30:43 volumiok volumio[865]: info: Downloading/unpacking socketIO-client
May 24 14:30:44 volumiok volumio[865]: info:   Downloading socketIO-client-0.7.2.tar.gz
May 24 14:30:44 volumiok volumio[865]: info:   Running setup.py (path:/tmp/pip-build-1P5SY6/socketIO-client/setup.py) egg_info for package socketIO-client
May 24 14:30:46 volumiok volumio[865]: info:
May 24 14:30:46 volumiok volumio[865]: info:     warning: no files found matching '*.html'
May 24 14:30:47 volumiok volumio[865]: info:     warning: no files found matching '*.js'
May 24 14:30:47 volumiok volumio[865]: info:     warning: no previously-included files matching '*.pyc' found anywhere in distribution
May 24 14:30:47 volumiok volumio[865]: info: Downloading/unpacking requests>=2.7.0 (from socketIO-client)
May 24 14:30:50 volumiok volumio[865]: info: Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from socketIO-client)
May 24 14:30:50 volumiok volumio[865]: info: Downloading/unpacking websocket-client (from socketIO-client)
May 24 14:30:51 volumiok volumio[865]: info: Downloading/unpacking certifi>=2017.4.17 (from requests>=2.7.0->socketIO-client)
May 24 14:30:53 volumiok volumio[865]: info: Downloading/unpacking chardet>=3.0.2,<5 (from requests>=2.7.0->socketIO-client)
May 24 14:30:54 volumiok volumio[865]: info: Downloading/unpacking idna>=2.5,<3 (from requests>=2.7.0->socketIO-client)
May 24 14:30:55 volumiok volumio[865]: info: Downloading/unpacking urllib3>=1.21.1,<1.27 (from requests>=2.7.0->socketIO-client)
May 24 14:30:57 volumiok volumio[865]: info: Installing collected packages: st7789, socketIO-client, requests, websocket-client, certifi, chardet, idna, urllib3
May 24 14:30:57 volumiok volumio[865]: info:   Running setup.py install for socketIO-client
May 24 14:30:59 volumiok volumio[865]: info:
May 24 14:30:59 volumiok volumio[865]: info:     warning: no files found matching '*.html'
May 24 14:30:59 volumiok volumio[865]: info:     warning: no files found matching '*.js'
May 24 14:31:00 volumiok volumio[865]: info:     warning: no previously-included files matching '*.pyc' found anywhere in distribution
May 24 14:31:00 volumiok volumio[865]: info:   Found existing installation: requests 2.4.3
May 24 14:31:01 volumiok volumio[865]: info:     Not uninstalling requests at /usr/lib/python2.7/dist-packages, owned by OS
May 24 14:31:02 volumiok volumio[865]: info:   Found existing installation: chardet 2.3.0
May 24 14:31:02 volumiok volumio[865]: info:     Not uninstalling chardet at /usr/lib/python2.7/dist-packages, owned by OS
May 24 14:31:07 volumiok volumio[865]: info:   Found existing installation: urllib3 1.9.1
May 24 14:31:07 volumiok volumio[865]: info:     Not uninstalling urllib3 at /usr/lib/python2.7/dist-packages, owned by OS
May 24 14:31:09 volumiok volumio[865]: info: Successfully installed st7789 socketIO-client requests websocket-client certifi chardet idna urllib3
May 24 14:31:09 volumiok volumio[865]: info: Cleaning up...

@AxLED, sorry I didnt see your new tipp. I will try it right now.

Now it works, Thanks AxLED!

volumio@volumiok:~$ pip --version
Traceback (most recent call last):
File “/usr/bin/pip”, line 9, in
load_entry_point(‘pip==1.5.6’, ‘console_scripts’, ‘pip’)()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2476, in load_entry_point
return ep.load()
File “/usr/lib/python2.7/dist-packages/pkg_resources.py”, line 2190, in load
[‘name’])
File “/usr/lib/python2.7/dist-packages/pip/init.py”, line 74, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File “/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py”, line 9, in
from pip.download import path_to_url
File “/usr/lib/python2.7/dist-packages/pip/download.py”, line 25, in
from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead
volumio@volumiok:~$ sudo easy_install -U pip
[sudo] password for volumio:
Searching for pip
Reading https://pypi.python.org/simple/pip/
Couldn’t find index page for ‘pip’ (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Best match: pip 1.5.6
Adding pip 1.5.6 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Using /usr/lib/python2.7/dist-packages
Processing dependencies for pip
Finished processing dependencies for pip
volumio@volumiok:~$ pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
volumio@volumiok:~$ sudo pip uninstall websocket-client
Uninstalling websocket-client:
/usr/local/bin/wsdump.py
.
.
Proceed (y/n)? y
Successfully uninstalled websocket-client
volumio@volumiok:~$ 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…

Thanks AxLED , display is working fine. Even all buttons are working fine ( Y = 24). Just one issue I am not able to control volume, it’s running on max every time. My headphones do not have volume controls, so not able to use it as iPod.

is volume control via webgui working?

AxLED

No AxLED, volume control from webgui is also not working.

100rin

Did you use following settings?
Volume setting → type of mixer: “Software"
Maybe after changing the settings a reboot is needed.

AxLED

Thanks, yes it worked fine.

I am able to see one issue here, i am not able to search USB songs from device it says plugin doesn’t support, but webgui is able to show all songs. I am using Raspberry Pi Zero W.

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.

@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