Search code examples
pythonwindowsironpythonbonjour

PyBonjour error in Windows - Cannot load library libdns_sd.so.1


When running PyBonjour under IronPython 2.6, I get an error which says:

OSError: IronPython.Runtime.Exception.OSException: cannot load library libdns_sd.so.1

This stems from the line:

ctypes.cdll.LoadLibrary(_libdnssd)

Where _libdnssd is "libdns_sd.so.1" I have all of the Bonjour tools Apple distributes installed on the system.

Does anyone know how to fix this?


Solution

  • My guess is that PyBonjour has a check similar to sys.platform == 'win32' to determine which DLL to load. That should probably be changed to os.name == 'nt' to work properly.

    I haven't looked at PyBonjour to see if I'm right, though (if there's a way to do it without installing bzr I can take a look).