#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    38
    Rep Power
    13

    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!
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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

  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    38
    Rep Power
    13
    Also made a post on the linux board, no new answers yet.
  6. #4
  7. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo