ImportError: No module named dijkstra_ryu.py
See original GitHub issueHi, I wanted to try codes from http://csie.nqu.edu.tw/smallko/sdn/dijkstra_ryu.htm but when I try to run the codes, it doesn’t work.
I am using Ubuntu 16.04.4 LTS, python 2.7.12 and 3.5.2, and ryu 4.23.
Here’s the error:
ray@raihanr:~/ryu/ryu/app$ ryu-manager dijkstra_ryu.py --observe-links loading app dijkstra_ryu.py Traceback (most recent call last): File "/usr/local/bin/ryu-manager", line 9, in <module> load_entry_point('ryu==4.23', 'console_scripts', 'ryu-manager')() File "/usr/local/lib/python2.7/dist-packages/ryu/cmd/manager.py", line 98, in main app_mgr.load_apps(app_lists) File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 415, in load_apps cls = self.load_app(app_cls_name) File "/usr/local/lib/python2.7/dist-packages/ryu/base/app_manager.py", line 392, in load_app mod = utils.import_module(name) File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 104, in import_module return importlib.import_module(modname) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named dijkstra_ryu.py
I already tried using this:
:~$ryu-manager ryu/ryu/app/dijkstra_ryu.py --observe-links
But it showing a different error:
ImportError: Import by filename is not supported.
Also, I already checked every module and not missing any part.
Is there someone who can help me?
Best,
Ray
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (1 by maintainers)
Top GitHub Comments
@raghdaaljaff when I try the other pojects, they are creating the same error for the ryu controller codes. but when I try the topology codes, it works fine. Let knowing each other then
Hi. I get an error when I tried to ping hosts which are connected to different switches. For example if I have a layer-2 tree topology created with mininet: sudo mn --topo tree,2 --controller remote and tried to ping h3 from h1, I got the following error:
(‘get_path is called, src=’, 3, ’ dst=‘, 2, ’ first_port=’, 1, ’ final_port=', 1) (‘Q=’, set([1, 2, 3])) [(3, 1, None), (2, None, 1)] install_path is called ProjectController: Exception occurred during handler processing. Backtrace from offending handler [_packet_in_handler] servicing event [EventOFPPacketIn] follows. Traceback (most recent call last): File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/base/app_manager.py”, line 290, in _event_loop handler(ev) File “/home/ubuntu/ryu/ryu/app/dijkstra.py”, line 155, in _packet_in_handler self.install_path(p, ev, src, dst) File “/home/ubuntu/ryu/ryu/app/dijkstra.py”, line 116, in install_path datapath.send_msg(mod) File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/controller/controller.py”, line 442, in send_msg msg.serialize() File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/ofproto/ofproto_parser.py”, line 270, in serialize self._serialize_body() File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/ofproto/ofproto_v1_3_parser.py”, line 2747, in _serialize_body inst.serialize(self.buf, offset) File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/ofproto/ofproto_v1_3_parser.py”, line 2939, in serialize a.serialize(buf, action_offset) File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/ofproto/ofproto_v1_3_parser.py”, line 3049, in serialize offset, self.type, self.len, self.port, self.max_len) File “/home/ubuntu/.local/lib/python2.7/site-packages/ryu/lib/pack_utils.py”, line 25, in msg_pack_into struct.pack_into(fmt, buf, offset, *args) error: cannot convert argument to integer
Does anybody can help me? Thank you.