Bugzilla – Bug 1349
TypeId.LookupAttributeByName Python bindings missing
Last modified: 2012-02-20 11:46:49 UTC
Hello, The Python bindings for TypeId.LookupAttributeByName seem to be missing. Here is how to reproduce the problem: $ hg clone http://code.nsnam.org/ns-3-allinone ns-3-allinone $ cd ns-3-allinone $ ./download.py -n ns-3-dev $ cd ns-3-dev $ ./waf configure -d optimized $ ./waf $ cd build/bindings/python $ LD_LIBRARY_PATH=../../ ipython In [1]: from ns.core import TypeId In [2]: typeid = TypeId.LookupByName("ns3::Node") In [3]: info = TypeId.AttributeInformation() In [4]: found = typeid.LookupAttributeByName("Id", info) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /home/alina/repos/ns-allinone-3-dev/ns-3-dev/build/bindings/python/<ipython console> in <module>() AttributeError: '_core.TypeId' object has no attribute 'LookupAttributeByName' The same thing happens if I rescan the bindings using pybindgen 795. I found some warnings in the logs about the option "transfer_ownership", which seems to be required but missing when building the bindings (same happens for other methods): ./build/src/tools/bindings/ns3modulegen.log:/home/alina/repos/ns-allinone-3-dev/ns-3-dev/src/tools/bindings/modulegen__gcc_LP64.py:9: UserWarning: exception TypeConfigurationError('Missing transfer_ownership option',) in wrapper public: retval? ???::LookupAttributeByName (params?) const;
changeset: 7723:dfd109d5caf0 tag: tip user: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> date: Mon Feb 20 16:45:50 2012 +0000 summary: Bug 1349 - TypeId.LookupAttributeByName Python bindings missing Someone had renamed AttributeInfo -> AttributeInformation, which caused the wrapper to stop being generated.