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

dbus not found #1

Closed
revast opened this issue Sep 3, 2018 · 7 comments
Closed

dbus not found #1

revast opened this issue Sep 3, 2018 · 7 comments
Assignees
Labels

Comments

@revast
Copy link

revast commented Sep 3, 2018

 jack-select 
Traceback (most recent call last):
  File "/usr/local/bin/jack-select", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3088, in <module>
    @_call_aside
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 574, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'dbus-python' distribution was not found and is required by jack-select

I am under ubuntu 18.04, and python3-dbus is installed. When I run the python3 interpreter, and issue an " import dbus ", it is working as expected. I did a "sudo make install" install, which installed to /usr/local

@SpotlightKid
Copy link
Owner

Yes, unfortunately the dbus-python package, when installed via your Linux distribution's packages, does not register itself correctly as a setupotools compatible package. Thatswhy I patch the setup.py file to remove the explicit dbus-python dependency in my AUR package for jack-select.

The dbus-python package has been marked as outdated now, so I should probably switch to pydbus, but that will probably not happen for another few weeks.

I can only recommend to either edit the setup.py file yourself and remove the dbus-python dependency or install jack-select into a virtualenv. This will install all the dependencies (dbus-python, PyGObject and pyxdg) from PyPI instead of from your distribution packages and will install them into the virtualenv in a way that satisfies the setuptools dependency check. You'll need to have a compiler and the python development headers installed, though (install package build-essential and python3-dev), since some packages are not available as binary wheels on PyPI and need to be compiled on your system (e.g. pycairo).

@revast
Copy link
Author

revast commented Sep 3, 2018

ok. thanks
removing python-dbus package from install_requires, I get

update-desktop-database -q
gtk-update-icon-cache /usr/local/share/icons/hicolor
gtk-update-icon-cache: No theme index file.
Makefile:25: recipe for target 'install' failed
make: *** [install] Error 1

because of gtk-update-icon... which I can then disable.

then when I run it:

jack-select 

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'de.chrisarndt.JackSelectService': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/jackselect/jackselect.py", line 363, in main
    client = get_dbus_client(bus)
  File "/usr/local/lib/python3.6/dist-packages/jackselect/jackselect.py", line 337, in get_dbus_client
    obj = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name de.chrisarndt.JackSelectService was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/jack-select", line 11, in <module>
    load_entry_point('jack-select==1.1.0', 'console_scripts', 'jack-select')()
  File "/usr/local/lib/python3.6/dist-packages/jackselect/jackselect.py", line 376, in main
    JackSelectApp(bus)
  File "/usr/local/lib/python3.6/dist-packages/jackselect/jackselect.py", line 176, in __init__
    self.load_presets()
  File "/usr/local/lib/python3.6/dist-packages/jackselect/jackselect.py", line 196, in load_presets
    ) = get_qjackctl_presets(qjackctl_conf)
  File "/usr/local/lib/python3.6/dist-packages/jackselect/qjackctlconf.py", line 49, in get_qjackctl_presets
    preset, setting = name.split('\\', 1)
ValueError: not enough values to unpack (expected 2, got 1)

I was able to setup a virtualenv, then install the dependencies, but when I try to install, I get

python3 setup.py install --prefix=/opt/jack-select/
running install
Checking .pth file support in /opt/jack-select/lib/python3.6/site-packages/
/usr/bin/python3 -E -c pass
TEST FAILED: /opt/jack-select/lib/python3.6/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /opt/jack-select/lib/python3.6/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations


Please make the appropriate changes for your system and try again.

@SpotlightKid
Copy link
Owner

It seems that your QjackCtl.conf file has a line in the [Settings] section, which does not conform to the expected format.

Did you create any presets with QjackCtl at all before starting jack-select? Can you post the contents of the [Settings] section of your QjackCtl.conf file here? It should be in the ~/.config/rncbc.org/ directory.

@revast
Copy link
Author

revast commented Sep 4, 2018

[Settings]
Audio=0
Chan=0
Dither=0
Audio=0
Chan=0
Dither=0
Driver=alsa
Frames=2048
HWMeter=false
HWMon=false
IgnoreHW=false
InChannels=0
InDevice=
InLatency=0
MidiDriver=none
Monitor=false
NoMemLock=false
OutChannels=0
OutDevice=
OutLatency=0
Periods=3
PortMax=256
Priority=6
Realtime=true
SampleRate=44100
Server=/usr/bin/jackd
ServerName=
ServerSuffix=
Shorts=false
SoftMode=true
StartDelay=2
Timeout=500
UnlockMem=true
Verbose=false
Wait=21333
WordLength=16

No presets.
I have some startup scripts defined, could that be the source of the error? qjackctl version is qjackctl_0.5.3.10git.06f15c-1_amd64 from rui's suse-openbuildserver repository

I have now renamed my qjacktl config folder, then generated a new one, and jack-select runs.
but there is something strange with qjackctl: it starts jack, then displays an error message it could not start jack, but then it starts it anyways, but jack is the using all CPU cores, jack-select tray icon does not
get green.

Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 16bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 2 periods for playback
10:21:23.401 Could not connect to JACK server as client. - Overall operation failed. - Server communication error. Please check the messages window for more info.
JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Driver is not running
Cannot read socket fd = 25 err = Success
CheckRes error
JackSocketClientChannel read fail
Cannot create new client
Cannot open qjackctl client
JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Unknown request 4294967295
CheckSize error size = 0 Size() = 12
CheckRead error
10:21:36.730 JACK is stopping...
Jack main caught signal 15
10:22:13.832 JACK is stopping...
10:22:18.281 JACK is stopping...
10:22:18.325 JACK was stopped
10:22:18.327 JACK has crashed.  

I also tried with cadence, which works flawlessly, also, jack-select does get green and red in tray when using start and stop jack in cadence. I will try to find out the differences to my setup and the vanilla one...

https://pastebin.com/nUL2sMiM would be the vanilla one qjackctl created. I see there is no[Settings] section...

https://pastebin.com/edXRTZrz would be mine..

I have tried to narrow down the problem, but it seems to be a problem on your side...
even with only

[Settings]  
Audio=0

it gives the same error... If I remove that last line the error message disappears

@SpotlightKid
Copy link
Owner

The problem was, that if you have only the default preset saved in QjackCtl, its configuration file, resp. the Settings section, has a slightly different format than when you have one or several custom presets, and jack-select didn't handle this correctly. This should be fixed in version 1.1.1, which I just released.

I also tweaked the Makefile to ignore the error when running gtk-update-icon-cache and added some hints to the readme on how to solve installation problems.

@SpotlightKid
Copy link
Owner

I opened #2 to track the task of replacing dbus-python. I'll close this issue, since the other issues you mentioned should be fixed. Feel free to re-open this issue if you still have problems regarding these issues with version 1.1.1. If you should encounter other problems, please open a new issue.

@revast
Copy link
Author

revast commented Sep 4, 2018

thanks a lot!
I always wanted to have means to visually see the status of JACK, and not having cadence or qjackctl running for that.
Very cool to have one now. The Presets integration tops it - Really handy if you have more the one device and you switch them often.

Schoene Gruesse aus der Steiermark ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants