Bugzilla – Bug 1442
make pyviz resilient to nedevice module import failures
Last modified: 2013-10-09 15:25:07 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.
Created attachment 1409 [details] patch
changing the title as it is reproducible on Linux also. Would this be remedied by enabling bindings on the virtual-net-device module?
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.
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...
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 )
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".
(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?