[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Issue: PyQt5 can only connect to one D-Bus service, not two.
From:       David Roberts <ddr () krontech ! ca>
Date:       2018-10-05 1:59:23
Message-ID: CA++ZCTCRdhh5Wf+OjAd=bd_1MGByhwDz4wdgbpvskfdJXYp9ng () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Never mind, turned out I had to specify the paths differently. Just a
simple misunderstanding.

On Thu, Oct 4, 2018 at 6:41 PM David Roberts <ddr@krontech.ca> wrote:

> Hello. I'm pretty sure this is a bug, but I'm having trouble connecting to
> two D-Bus services at once. The second connection connects to the first
> service, although it claims to be correctly connected to the second service.
>
> I have detailed my findings on StackOverflow in the form of a question. <
> https://stackoverflow.com/questions/52657066/pyqt5-how-to-connect-to-two-d-bus-services-at-once>.
> I will, however, attach the minimal reproduction case here as well.
>
> In a nutshell, both result1 and result2 are the same after running the
> following code:
>
>     provider1API = QDBusInterface('com.krontech.chronos.control.mock',
> '/', '',
>         QDBusConnection.systemBus() )
>     provider2API = QDBusInterface('com.krontech.chronos.video.mock', '/',
> '',
>         QDBusConnection.systemBus() )
>
>     result1 = QDBusReply(provider1API.call('exampleCall')).value()
>     result2 = QDBusReply(provider2API.call('exampleCall')).value()
>
> result1 and result2 should be different, since they are connecting to two
> different D-Bus interfaces which return two different results.
>
> I am using Python 3.7, PyQt 5.11.2, and Qt 5.11.1 on Debian 7.
>
> Thank you,
> –DDR
>
> (Note: To enable D-Bus, you may need a D-Bus policy file. I have attached
> an example one, com.krontech.chronos.conf, but if you're not running Python
> as root you will need to change the username in it. The policy file goes in
> /etc/dbus-1/system.d/.)
>

[Attachment #5 (text/html)]

<div dir="ltr">Never mind, turned out I had to specify the paths differently. Just a \
simple misunderstanding.<br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, \
Oct 4, 2018 at 6:41 PM David Roberts &lt;<a \
href="mailto:ddr@krontech.ca">ddr@krontech.ca</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div \
dir="ltr"><div dir="ltr"><div>Hello. I&#39;m pretty sure this is a bug, but I&#39;m \
having trouble connecting to two D-Bus services at once. The second connection \
connects to the first service, although it claims to be correctly connected to the \
second service.</div><div><br></div><div>I have detailed my findings on StackOverflow \
in the form of a question. &lt;<a \
href="https://stackoverflow.com/questions/52657066/pyqt5-how-to-connect-to-two-d-bus-services-at-once" \
target="_blank">https://stackoverflow.com/questions/52657066/pyqt5-how-to-connect-to-two-d-bus-services-at-once</a>&gt;. \
I will, however, attach the minimal reproduction case here as \
well.</div><div><br></div><div>In a nutshell, both result1 and result2 are the same \
after running the following code:<br></div><div><br></div><div>       provider1API = \
QDBusInterface(&#39;com.krontech.chronos.control.mock&#39;, &#39;/&#39;, \
&#39;&#39;,<br>              QDBusConnection.systemBus() )<br>       provider2API = \
QDBusInterface(&#39;com.krontech.chronos.video.mock&#39;, &#39;/&#39;, \
&#39;&#39;,<br>              QDBusConnection.systemBus() )</div><div>       \
</div><div>       result1 = \
QDBusReply(provider1API.call(&#39;exampleCall&#39;)).value()<br>       result2 = \
QDBusReply(provider2API.call(&#39;exampleCall&#39;)).value()</div><div><br></div><div>result1 \
and result2 should be different, since they are connecting to two different D-Bus \
interfaces which return two different results.</div><div><br></div><div>I am using \
Python 3.7, PyQt 5.11.2, and Qt 5.11.1 on Debian \
7.<br></div><div><br></div><div>Thank you,</div><div>–DDR<br><br></div><div>(Note: \
To enable D-Bus, you may need a D-Bus policy file. I have attached an example one, \
com.krontech.chronos.conf, but if you&#39;re not running Python as root you will need \
to change the username in it. The policy file goes in \
/etc/dbus-1/system.d/.)<br></div></div></div></div></div></div> </blockquote></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic