[PyQt] TypeError related to dbus.mainloop when building PyQt
Florian Bruhin
me at the-compiler.org
Thu Apr 28 17:41:06 BST 2016
* Phil Thompson <phil at riverbankcomputing.com> [2016-04-28 17:33:50 +0100]:
> On 27 Apr 2016, at 3:36 pm, Florian Bruhin <me at the-compiler.org> wrote:
> >
> > When building the current snapshots of Qt/PyQt/sip I get this:
> >
> > Checking to see if the dbus support module should be built...
> > pkg-config --cflags-only-I --libs dbus-1
> > An internal error occured. Please report all the output from the program,
> > including the following traceback, to support at riverbankcomputing.com.
> > Traceback (most recent call last):
> > File "configure.py", line 2896, in <module>
> > main(sys.argv)
> > File "configure.py", line 2880, in main
> > check_dbus(target_config, opts.verbose)
> > File "configure.py", line 2131, in check_dbus
> > target_config.pydbus_module_dir = dbus.mainloop.__path__[0] TypeError: '_NamespacePath' object does not support indexing
> >
> > And I can reproduce the same when using Python directly too:
> >
> > [user at 54c8a06abe39 PyQt5_gpl-5.6.1.dev1604260930]$ python3
> > Python 3.5.1 (default, Mar 3 2016, 09:29:07)
> > [GCC 5.3.0] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import dbus.mainloop
> > >>> dbus.mainloop.__path__
> > _NamespacePath(['/usr/lib/python3.5/site-packages/dbus/mainloop'])
> > >>> dbus.mainloop.__path__[0]
> > Traceback (most recent call last):
> > File "<stdin>", line 1, in <module>
> > TypeError: '_NamespacePath' object does not support indexing
> >
> > What does work (though it's private attribute access...) is using
> > _path:
> >
> > >>> dbus.mainloop.__path__._path
> > ['/usr/lib/python3.5/site-packages/dbus/mainloop']
> > >>> dbus.mainloop.__path__._path[0]
> > '/usr/lib/python3.5/site-packages/dbus/mainloop'
>
> Can you try changing...
>
> target_config.pydbus_module_dir = dbus.mainloop.__path__[0]
>
> ...to...
>
> target_config.pydbus_module_dir = list(dbus.mainloop.__path__)[0]
I tried again today and suddenly dbus.mainloop.__path__ *is* a list
and not a _NamespacePath object...
I can't explain this. I'll let you know if I encounter it again :)
Florian
--
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160428/154acdc5/attachment.sig>
More information about the PyQt
mailing list