seveas / python-networkmanager

Easy communication with NetworkManager
http://packages.python.org/python-networkmanager/
Other
166 stars 90 forks source link

DBusException: org.freedesktop.DBus.Error.NoMemory: Not enough memory #70

Closed ilovefood2 closed 1 year ago

ilovefood2 commented 5 years ago

I installed python-networkmanager with no error

but when importing python-networkmanager

import NetworkManager
NetworkManager.NetworkManager.Version

I got error as below

---------------------------------------------------------------------------
DBusException                             Traceback (most recent call last)
<ipython-input-2-1f4a32560b40> in <module>
----> 1 import NetworkManager
      2 NetworkManager.NetworkManager.Version
      3 # for conn in NetworkManager.NetworkManager.ActiveConnections:
      4 #     print('Name: %s; vpn?: %s' % (conn.Id))

/usr/local/lib/python3.7/site-packages/NetworkManager.py in <module>
    102 # this is done at import time, use a special dbus connection that does not get
    103 # in the way of setting a mainloop and doing async stuff later.
--> 104 init_bus = dbus.SystemBus(private=True)
    105 xml_cache = {}
    106 

/usr/local/lib/python3.7/site-packages/dbus/_dbus.py in __new__(cls, private, mainloop)
    192         """
    193         return Bus.__new__(cls, Bus.TYPE_SYSTEM, mainloop=mainloop,
--> 194                            private=private)
    195 
    196 class SessionBus(Bus):

/usr/local/lib/python3.7/site-packages/dbus/_dbus.py in __new__(cls, bus_type, private, mainloop)
     98             raise ValueError('invalid bus_type %s' % bus_type)
     99 
--> 100         bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
    101 
    102         bus._bus_type = bus_type

/usr/local/lib/python3.7/site-packages/dbus/bus.py in __new__(cls, address_or_type, mainloop)
    120 
    121     def __new__(cls, address_or_type=TYPE_SESSION, mainloop=None):
--> 122         bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
    123 
    124         # _bus_names is used by dbus.service.BusName!

DBusException: org.freedesktop.DBus.Error.NoMemory: Not enough memory

obviously, I have enough memory on my MacBook (16G)

anyone know how to fix it ?

seveas commented 1 year ago

Closing all PR's and issues prior to archiving this repository.