Bug 1442 - make pyviz resilient to nedevice module import failures
make pyviz resilient to nedevice module import failures
Status: CONFIRMED
Product: ns-3
Classification: Unclassified
Component: visualizer
ns-3-dev
All All
: P5 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-31 17:02 EDT by Alex Afanasyev
Modified: 2013-10-09 15:25 EDT (History)
2 users (show)

See Also:


Attachments
patch (974 bytes, patch)
2012-05-31 17:02 EDT, Alex Afanasyev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Afanasyev 2012-05-31 17:02:38 EDT
Recently introduces LTE module introduces small changes in visualizer.  
Somehow, ns3.lte module requires virtual_net_device module, which is not available on mac.

The attached patch solves the problem by handling exception during the import of ns3.lte.  Not sure if this should be a permanent solution.
Comment 1 Alex Afanasyev 2012-05-31 17:02:57 EDT
Created attachment 1409 [details]
patch
Comment 2 Tom Henderson 2012-06-01 00:53:49 EDT
changing the title as it is reproducible on Linux also.  

Would this be remedied by enabling bindings on the virtual-net-device module?
Comment 3 Tom Henderson 2012-06-01 14:44:38 EDT
Alex, can you pull the tip of ns-3-dev (changeset 07e2e440d667) and retest, and close this bug if it works for you?  I pushed some changes that fixed it for me on my Linux test machine, but my OS X test machine is not set up with the supporting packages for visualization.
Comment 4 Gustavo J. A. M. Carneiro 2012-06-01 15:37:49 EDT
Eek, sorry for lack of responsiveness.  I saw this bug report in my cell phone, but then forgot to re-check in the laptop.  Unfortunately I can't fix now, tomorrow morning probably...
Comment 5 Gustavo J. A. M. Carneiro 2012-06-02 06:56:27 EDT
It's true that ns3.lte module requires virtual_net_device, because the underlying lte C++ module uses virtual-net-device for some reason.

Adding python bindings to virtual_net_device is the right way to go, but complementary approach of letting pyviz gracefully handle python module import failures is also a good idea IMHO, even if Alex's patch to do so is not the most clean way to achieve it (bare except anti-idiom, see http://docs.python.org/howto/doanddont.html#except )
Comment 6 Gustavo J. A. M. Carneiro 2012-06-02 07:01:38 EDT
Anyway, if after tom added virtual-net-device bindings the visualizer works, we can close this and I can open a separate bug report "make pyviz resilient to nedevice module import failures".
Comment 7 Tom Henderson 2012-12-06 00:03:33 EST
(In reply to comment #6)
> Anyway, if after tom added virtual-net-device bindings the visualizer works,
> we can close this and I can open a separate bug report "make pyviz resilient
> to nedevice module import failures".

I think the original symptoms are gone, but the question is whether to open the separate bug report as suggested above.  Gustavo?