On Sun, 20 May 2018 09:52:11 +0900, nail göksel wrote: > > [1 <multipart/alternative (7bit)>] > [1.1 <text/plain; UTF-8 (7bit)>] > Hello, > > I'm not a python professional. I cannot import my own class file in ryu > application. > > In main ryu application class i have simply wrote: > > from class1 import Class1 > > in class1 file: > > class Class1(): > def __init__(self, value): > some code... > > def increase(self): > some code... > > When i starded ryu with first class file i get the error: > > ImportError: cannot import name Class1 > > I think its not related with python because i could run similar code > successfully with python interpreter. > > Where am i wrong, is it a special think that i have to consider importing > class file in ryu application?
I assume you are using AppManager.run_apps to load your class. It sounds like a pythonpath issue, but I'm not quite sure. Does setting the PYTHONPATH environment variable makes any difference? -- 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