Hi,

I have a ryu module/file(* mybgpapp1.py*) in the path
*/home/mininet/ryu/ryu/services/protocols/bgp*
1) When i am importing from file *application.py* as below it works fine:

       from ryu.services.protocols.bgp import application as bgp_application

2)However when i import from another file application1.py (a modified
version of application.py)

       from ryu.services.protocols.bgp import application1 as bgp_application

  i am getting the following error message.

*loading app mybgpapp1.py*
*Traceback (most recent call last):*
*  File "/usr/local/bin/ryu-manager", line 9, in <module>*
*    load_entry_point('ryu==4.22', '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 99, in
import_module*
*    return _import_module_file(modname)*
*  File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 88, in
_import_module_file*
*    return load_source(modname, abspath)*
*  File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 39, in
load_source*
*    return imp.load_source(name, pathname)*
*  File "/home/mininet/ryu/ryu/services/protocols/bgp/mybgpapp1.py", line
3, in <module>*
*    from ryu.services.protocols.bgp import application1 as bgp_application*
*ImportError: cannot import name application1*

Pls guide. Why am i unable to import from my customized modules?.

Thanks
Hadem
------------------------------------------------------------------------------
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

Reply via email to