help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Got "ValueError: Attempted relative import in non-package" when use rope


From: Oleksandr Gavenko
Subject: Got "ValueError: Attempted relative import in non-package" when use ropemacs.
Date: Tue, 28 Feb 2012 23:32:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

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!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]