Bug 1349 - TypeId.LookupAttributeByName Python bindings missing
TypeId.LookupAttributeByName Python bindings missing
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: python bindings
ns-3-dev
All All
: P5 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-29 13:50 UTC by alina
Modified: 2012-02-20 11:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alina 2012-01-29 13:50:50 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;
Comment 1 Gustavo J. A. M. Carneiro 2012-02-20 11:46:49 UTC
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.