[PyQt] TypeError related to dbus.mainloop when building PyQt

Florian Bruhin me at the-compiler.org
Wed Apr 27 15:36:42 BST 2016


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'

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/20160427/ec193d4a/attachment.sig>


More information about the PyQt mailing list