LEW21 / pydbus

Pythonic DBus library
GNU Lesser General Public License v2.1
331 stars 75 forks source link

OverflowError: range() result has too many items #66

Closed lrusak closed 6 years ago

lrusak commented 7 years ago

I'm having an issue running pydbus on my Raspberry Pi 2. I'm using it in an embedded context so I have to cross compile all the libraries including gobject-introspection (which is a pain) but I don't think that is an issue as everything compiles fine. This is running on armv7 which is just 32bit so maybe it has to do with some memory limitation. The same cross-compile onto x86_64 hardware works fine.

A quick google suggests changing range() to use xrange() instead but I'm not really sure.

If you need anymore info please let me know.

$ python notifications_server.py 
Traceback (most recent call last):
  File "notifications_server.py", line 64, in <module>
    bus.publish("org.freedesktop.Notifications", Notifications())
  File "/usr/lib/python2.7/site-packages/pydbus/publication.py", line 42, in publish
    return Publication(self, bus_name, *objects)
  File "/usr/lib/python2.7/site-packages/pydbus/publication.py", line 35, in __init__
    self._at_exit(bus.request_name(bus_name, allow_replacement=allow_replacement, replace=replace).__exit__)
  File "/usr/lib/python2.7/site-packages/pydbus/request_name.py", line 29, in request_name
    return NameOwner(self, name, allow_replacement, replace)
  File "/usr/lib/python2.7/site-packages/pydbus/request_name.py", line 8, in __init__
    res = bus.dbus.RequestName(name, flags)
  File "/usr/lib/python2.7/site-packages/pydbus/bus.py", line 45, in dbus
    self._dbus = self.get(".DBus")[""]
  File "/usr/lib/python2.7/site-packages/pydbus/proxy.py", line 52, in get
    xml, = ret.unpack()
  File "/usr/lib/python2.7/site-packages/gi/overrides/GLib.py", line 319, in unpack
OverflowError: range() result has too many items
LEW21 commented 6 years ago

Sorry, but I'm going to drop Python 2 support in the next minor release.