I'm not sure where to print the path. Do I add that to the
update_feeds.py? Or does this go in the cron itself?

If I add it to the script, and then run the script from the command
line, it prints what's on my python path and then runs the script as
normal.

But that's never been the issue. The cron is what's throwing the
error.

On Mar 4, 10:07 am, Evert Rol <[EMAIL PROTECTED]> wrote:
> > Unfortunately, I get the same traceback:
>
> > Traceback (most recent call last):
> > File "update_feeds.py", line 10, in ?
> >   import feedparser
> > ImportError: No module named feedparser
>
> Again: did you print the sys.path?
>
> The 'cd' is not going to work, unless your modules are relative to  
> the /path/to/script/
>
> I may have a solution, but I first want to know if it's a path problem.
>
> > Any idea how to import the module within the cron?
>
> > On Mar 4, 9:07 am, Jonas Christian <[EMAIL PROTECTED]> wrote:
> >> I ran into problems like that using cron and instead of trying to
> >> locate the real error in the paths (we were about to go live ...), I
> >> simple changed the cron line to read:
>
> >>  1 * * * * cd /path/to/script; /usr/bin/python update_feeds.py
>
> >> Why don't you try that and see if it helps...
>
> >> Jonas
>
> >> On 4 Mrz., 14:02, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> >> wrote:
>
> >>> Well part of the problem is that the script itself works fine. I can
> >>> run from the command line without a hitch. But when I try to run it
> >>> via the cron, I get the traceback about the feedparser module.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to