On Tue, 08 May 2018 11:39:38 +0900, 林佳烁 wrote: > > [1 <multipart/alternative (7bit)>] > [1.1 <text/plain; GBK (base64)>] > Hi, > > > I want to integrate gui_topology.py which is in ryu/app/gui_topology/ with > myapp.py. > However, I recieve 404 responses after I add a line of code into a copy > version of gui_topology.py in a new folder. > > > My operation to the scripts is as follow: > $ cd ~/ryu > $ cp -r ryu/app/gui_topology ryu/app/myfolder > $ cp ryu/app/simple_switch_13.py ryu/app/myfolder/ > Then I add a line of code, " app_manager.require_app(PATH + > '/simple_switch_13.py') ", at the bottom of gui_topology.py. > $ PYTHONPATH=. ./bin/ryu run ryu/app/myfolder/gui_topology.py --observe-links > > > Then I access http://localhost:8080 with my web browser and I get these > reponses in the terminal of the controller. > 127.0.0.1 - - [08/May/2018 10:27:34] "GET / HTTP/1.1" 200 515 0.011610 > 127.0.0.1 - - [08/May/2018 10:27:34] "GET /ryu.topology.css HTTP/1.1" 200 514 > 0.000825 > (7006) accepted ('127.0.0.1', 51232) > 127.0.0.1 - - [08/May/2018 10:27:34] "GET /ryu.topology.js HTTP/1.1" 200 8652 > 0.003208 > 127.0.0.1 - - [08/May/2018 10:27:35] "GET /v1.0/topology/switches HTTP/1.1" > 404 319 0.000844 > (7006) accepted ('127.0.0.1', 51238) > 127.0.0.1 - - [08/May/2018 10:27:35] "GET /v1.0/topology/ws HTTP/1.1" 404 339 > 0.001272 > 127.0.0.1 - - [08/May/2018 10:27:35] "GET /v1.0/topology/links HTTP/1.1" 404 > 316 0.000961 > > > However, after I rename the folder frome myfolder to gui_topo. It works fine!
Is it gui_topo or gui_topology? > Is it a bug? Is there anyone can help me? Sounds like an import issue. Please check your error messages for any import errors. And also double check you are actually importing the intended files. It is possible files under /usr/lib/python or so are imported unintentionally. -- IWAMOTO Toshihiro ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel