question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: No module named dijkstra_ryu.py

See original GitHub issue

Hi, 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:closed
  • Created 4 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
raynard131commented, Apr 7, 2019

@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

0reactions
robertbotezcommented, Apr 20, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python error "ImportError: No module named" - Stack Overflow
WinSCP thought: "This has something that's not basic text; I'll put a .bin extension to indicate binary data." The missing __init__.py (now called...
Read more >
Resolve "ImportError: No module named" in AWS Glue
When I try to import extra modules or packages using the AWS Glue Python shell, I get an "ImportError: No module named" response....
Read more >
How to Fix ModuleNotFoundError and ImportError
A python module is a single file with a .py extension. ... import aModuleNotFoundError: No module named 'a'. or ImportError :
Read more >
Error: ImportError: No module named arcpy - Esri Support
Error: ImportError: No module named arcpy. Error Message. When attempting to import arcpy using 64-bit Python that comes with an ArcGIS ...
Read more >
ImportError no module named '' - Digi Forum
My package has an __init__.py and following the read me on the github page I could be able to use my created classes....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found