Problems with running PyViz in ns-3.11

573 views
Skip to first unread message

mahdi imani

unread,
Jul 19, 2011, 11:14:15 AM7/19/11
to ns-3-users
Hello,
I have run PyViz in ns-3.10 on ubuntu as explained in
http://www.nsnam.org/wiki/index.php/PyViz and there wasn't any
problem.
In ns-3.11 I added #include "ns3/visualizer-module.h" in my code and
typed ./waf --run scratch/myfile --vis in terminal, but I got the
following error :

assert failed. cond="!m_metadataSkipped", msg="Error: attempting to
enable the packet metadata subsystem too late in the simulation, which
is not allowed.
A common cause for this problem is to enable ASCII tracing after
sending any packets. One way to fix this problem is to call
ns3::PacketMetadata::Enable () near the beginning of the program,
before any packets are sent.", file=../src/network/model/packet-
metadata.cc, line=59
terminate called without an active exception
Command ['/home/mahdi/ns-allinone-3.11/ns-3.11/build/debug/scratch/
myfile', '--SimulatorImplementationType=ns3::VisualSimulatorImpl']
terminated with signal SIGIOT. Run it under a debugger to get more
information (./waf --run <program> --command-template="gdb --args %s
<args>").

Can anyone help me ?
Thanks.

Gustavo Carneiro

unread,
Jul 19, 2011, 11:28:48 AM7/19/11
to ns-3-...@googlegroups.com
Call Packet::EnablePrinting() early in your simulation code.  That should solve it.


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert

mahdi imani

unread,
Jul 19, 2011, 11:47:34 AM7/19/11
to ns-3-users
Thank you very much Gustavo, I did it and worked :)
But What about in Mac OS ?
I got the following error :

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/mahdifaghihimani/ns-allinone-3.11/ns-3.11/src/
visualizer/visualizer/__init__.py", line 2, in <module>
from core import start, register_plugin, set_bounds,
add_initialization_hook
File "/Users/mahdifaghihimani/ns-allinone-3.11/ns-3.11/src/
visualizer/visualizer/core.py", line 27, in <module>
import gobject
ImportError: No module named gobject

What is the solution ?
Thank you.

On Jul 19, 7:28 pm, Gustavo Carneiro <gjcarne...@gmail.com> wrote:
> Call Packet::EnablePrinting() early in your simulation code.  That should
> solve it.
>
> INESC Porto, UTM, WiN,http://win.inescporto.pt/gjc

Gustavo Carneiro

unread,
Jul 19, 2011, 12:58:21 PM7/19/11
to ns-3-...@googlegroups.com
On Tue, Jul 19, 2011 at 16:47, mahdi imani <smahdi...@googlemail.com> wrote:
Thank you very much Gustavo, I did it and worked :)
But What about in Mac OS ?
I got the following error :

Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "/Users/mahdifaghihimani/ns-allinone-3.11/ns-3.11/src/
visualizer/visualizer/__init__.py", line 2, in <module>
   from core import start, register_plugin, set_bounds,
add_initialization_hook
 File "/Users/mahdifaghihimani/ns-allinone-3.11/ns-3.11/src/
visualizer/visualizer/core.py", line 27, in <module>
   import gobject
ImportError: No module named gobject

What is the solution ?
Thank you.


I'm sorry, I don't have a Mac, so I have no idea how to install the missing packages.  Basically there's a bunch of python modules that you need to have installed in the system for this to work, among which are pygtk and pygoocanvas.
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc

mahdi imani

unread,
Jul 19, 2011, 1:35:49 PM7/19/11
to ns-3-users
Thank you so much indeed :)

On Jul 19, 8:58 pm, Gustavo Carneiro <gjcarne...@gmail.com> wrote:
> > > >http://www.nsnam.org/wiki/index.php/PyVizand there wasn't any
Reply all
Reply to author
Forward
0 new messages