Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 15th, 2003, 08:13 AM
wujie wujie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 38 wujie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
error with running a python program from crontab

I can run the prog.py (I have an extension module in C and its compile .so file is stored in the same dir as this program prog.py file) correctly at cml (that means no problem with loading my own module), then I wrote a C wrapper (also in the same dir) to start it at the crontab. My crontab line says:

0-59/5 * * * * cd $HOME/minijupe/crawl;LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/wu/local/lib $HOME/minijupe/crawl/pywrapper >> $HOME/minijupe/crawl/.log20031014 2>&1

which sets the extra LD_LIBRARY_PATH for my local gcc-3.3.1 build. But I still get such a libgcc error as follows:

------
Traceback (most recent call last):
File "PWD=/home/wu/minijupe/crawl", line 30, in ?
ImportError: libgcc_s.so.1: cannot open shared object file: No such file or directory
------

When I remove the "LD_..." part in my crontab row, the error is not removed.

I checked the file libgcc_s.so.1 and it IS in the directory /home/wu/local/lib.

Anyone knows what the matter is? Thanks!

Reply With Quote
  #2  
Old October 15th, 2003, 09:21 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
I'm pretty new to both *nix and C/C++.. Anyway the error your getting means that Python can't import 'libgcc_s.so.1', where abouts on your system is it? I'm guessing that your program works fine (just not under cron)?

If your just having problems running it from cron.. maybe one of the *nix forums would be a good place to ask?

It's an interesting problem.. Sorry, i guess i'm not helping

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old October 16th, 2003, 03:52 AM
wujie wujie is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 38 wujie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Also made a post on the linux board, no new answers yet.

Reply With Quote
  #4  
Old October 16th, 2003, 07:53 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,536 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 3 m 4 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
thats cool, well when you find out whats wrong with it let us know . Oh you might also want to do a search on comp.lang.python.. It's possible somone theres had this/a similar problem before

Mark.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > error with running a python program from crontab


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT