"import as" leads to unresolved import error, "from .. import" does not
Posted
by
Markus R.
on Stack Overflow
See other posts from Stack Overflow
or by Markus R.
Published on 2012-11-02T22:24:27Z
Indexed on
2012/11/02
23:01 UTC
Read the original article
Hit count: 226
pydev
I'm trying to write some plugins for the irc bot supybot with eclipse/pydev. Pydev gives me errors about unresolved imports on supybot-modules/packages (e. g. import supybot.utils as utils), but works ok on e. g. "from supybot.commands import *". So I guess I set up dydev correctly, as it finds the wanted modules. The problem must be in pydev/eclipse, as the bot works correct and in eric5 I get also no errors about that.
Removing the interpreter and setting it up didn't help. Any other ideas on how to fix this? System: Arch Linux, Eclipse Juno, PyDev 2.7.1, wanted (and set up) python interpreter is 2.7, supybot is installed in site-packages for Python 2.7.
Edit: Just noticed: PyDev doesn't mark the "from ... import *" as error, but if I use functions imported from there I get an error on that function.
© Stack Overflow or respective owner