Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 1, 2010 17:47:35

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unresolved import in Eclipse


Hi everyone.

I am using Eclipe 3.6.1 with Python 2.7 on Windows XP and my problem
is the following:

1) I have installed a module named : django-urlauth-0.1.1

2) In Eclipse, at the left of the line:

from urlauth.util import wrap_url

Eclipse qive a big red dot with the message : Unresolved import
wrap_url

3) But strangely If I open a shell window (django environnemnt window)
in Eclipse and type:

>> from urlauth.util import wrap_url

everything is fine and I can access the wrap_url function from the
shell window.

Any Idea what is wrong. I am new to django and Eclipse so maybe this
is trivial stuff, sorry if this is the case.

cclmb





--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 1, 2010 23:51:07

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unresolved import in Eclipse


I take it you're using PyDev with eclipse? My experience is that
eclipse often says that it can't resolve an import but is wrong. Just
remember an import will work if it is on your python path. When you
run the django project from eclipse it will use the python path as
well as the project directory to resolve imports. You can tell PyDev
about paths that you're importing from so that it knows where to
check. You do this for a project by clicking Project > Properties >
PyDev - PYTHONPATH. You can then add paths to the list of source
folders. I generally don't bother and tend to ignore eclipse's warning
about unresolved imports. If the import is wrong then you'll know
about it as soon as you try and run the website as it'll complain
loudly!




On Dec 1, 5:47 pm, cocolombo <cocolo...@gmail.com> wrote:
> Hi everyone.
>
> I am using Eclipe 3.6.1 with Python 2.7 on Windows XP and my problem
> is the following:
>
> 1) I have installed a module named : django-urlauth-0.1.1
>
> 2) In Eclipse, at the left of the line:
>
> from urlauth.util import wrap_url
>
> Eclipse qive a big red dot with the message : Unresolved import
> wrap_url
>
> 3) But strangely If I open a shell window (django environnemnt window)
> in Eclipse and type:
>
> >> from urlauth.util import wrap_url
>
> everything is fine and I can access the wrap_url function from the
> shell window.
>
> Any Idea what is wrong. I am new to django and Eclipse so maybe this
> is trivial stuff, sorry if this is the case.
>
> cclmb

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 1, 2010 23:55:09

Andre T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unresolved import in Eclipse


You could also try using Aptana Studio, which is imho better than Eclipse
for django development. They're very similar, but it's more refined.http://www.aptana.com/products/studio3<http://www.aptana.com/products/studio3>Mind you, I've never used it as a
plugin, just the standalone version.


Sincerely,

Andre Terra



On Wed, Dec 1, 2010 at 21:51, cootetom <coote...@gmail.com> wrote:

> I take it you're using PyDev with eclipse? My experience is that
> eclipse often says that it can't resolve an import but is wrong. Just
> remember an import will work if it is on your python path. When you
> run the django project from eclipse it will use the python path as
> well as the project directory to resolve imports. You can tell PyDev
> about paths that you're importing from so that it knows where to
> check. You do this for a project by clicking Project > Properties >
> PyDev - PYTHONPATH. You can then add paths to the list of source
> folders. I generally don't bother and tend to ignore eclipse's warning
> about unresolved imports. If the import is wrong then you'll know
> about it as soon as you try and run the website as it'll complain
> loudly!
>
>
>
>
> On Dec 1, 5:47 pm, cocolombo <cocolo...@gmail.com> wrote:
> > Hi everyone.
> >
> > I am using Eclipe 3.6.1 with Python 2.7 on Windows XP and my problem
> > is the following:
> >
> > 1) I have installed a module named : django-urlauth-0.1.1
> >
> > 2) In Eclipse, at the left of the line:
> >
> > from urlauth.util import wrap_url
> >
> > Eclipse qive a big red dot with the message : Unresolved import
> > wrap_url
> >
> > 3) But strangely If I open a shell window (django environnemnt window)
> > in Eclipse and type:
> >
> > >> from urlauth.util import wrap_url
> >
> > everything is fine and I can access the wrap_url function from the
> > shell window.
> >
> > Any Idea what is wrong. I am new to django and Eclipse so maybe this
> > is trivial stuff, sorry if this is the case.
> >
> > cclmb
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Dec. 2, 2010 01:22:22

Javier G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unresolved import in Eclipse


On Wed, Dec 1, 2010 at 6:54 PM, Andre Terra <andrete...@gmail.com> wrote:
> I've never used it as a plugin, just the standalone version.

the standalone is just an Eclipse installer with the plugin already
configured (and a few relevant others)

--
Javier

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Dec. 2, 2010 02:43:59

c.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Unresolved import in Eclipse


Thank you all.

Project > Properties > PyDev - PYTHONPATH was the problem I had.

I will try using Aptana Studio.

Thanks again.

On Dec 1, 8:22 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> On Wed, Dec 1, 2010 at 6:54 PM, Andre Terra <andrete...@gmail.com> wrote:
> > I've never used it as a plugin, just the standalone version.
>
> the standalone is just an Eclipse installer with the plugin already
> configured (and a few relevant others)
>
> --
> Javier

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 21st of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support