28 Feb 2012 22:32
Got "ValueError: Attempted relative import in non-package" when use ropemacs.
Oleksandr Gavenko <gavenkoa <at> gmail.com>
2012-02-28 21:32:09 GMT
2012-02-28 21:32:09 GMT
Recently I try use ropemacs and friends to simplify and speedup my coding experience in Python language. When all my code stay in single file - all ok. But when come time to split code to several files I get error: ValueError: Attempted relative import in non-package in *Python* buffer when visit Python file which use relative import: from .blogger import * from .wordpress import * File hierarchy: <root>/blog4y/blog4y.py <root>/blog4y/blogger.py <root>/blog4y/wordpress.py Note that my application: #!/usr/bin/env python from blog4y import blog4y blog4y.start() work fine when called from <root> directory... I am newbie for Python and rope. I think that solution lie in customising <root>/blog4y/blog4y/.ropeproject/config.py file... Next morning I try to read ropemacs manual but first look say that I don't resolve this problem myself... -- -- Best regards!
RSS Feed