Dear gurus,

Sorry if this is a little bit of topic, but I don't know a better place to
ask. I upgraded to Mailman 2.1b3 a week ago and run into som cron problems.
When I did the upgrade I also upgraded Python to version 2.2.1

I have a couple of cronjobs that do a backup of my listmembers and put them
on a ftp-server. One of the cronjobs looks like this:

python /home/mailman/bin/list_members -r -o /home/backup/skydivemembreg
skydive

If a run this command from the command line everything works perfect. When
cron runs the same command I get this error:

File "/home/mailman/bin/list_members", line 79
print >> sys.stderr, _(__doc__)
^
SyntaxError: invalid syntax

The server is a RedHat 7.1. Any clues?

TIA,
/David

Search Discussions

  • Jon Carnes at Sep 13, 2002 at 4:54 am
    Silly question, but is it running in the mailman users cron, or in
    root's cron?

    What are the rights on /home/backup/sky...?

    It could indeed be a python error, but first you should check for a
    rights problem, and then for an environment variable problem (is the
    "list_members" script using an environment variable that is defined
    while you are logged in but not defined when run via cron?).

    Is RedHat 7.1 the distro where two versions of Python are on it? What
    happens if you specify the full path to "python" at the command line and
    in your cron?

    Good Luck,

    Jon Carnes
    ===
    On Thu, 2002-09-12 at 16:41, David wrote:
    Dear gurus,

    Sorry if this is a little bit of topic, but I don't know a better place to
    ask. I upgraded to Mailman 2.1b3 a week ago and run into som cron problems.
    When I did the upgrade I also upgraded Python to version 2.2.1

    I have a couple of cronjobs that do a backup of my listmembers and put them
    on a ftp-server. One of the cronjobs looks like this:

    python /home/mailman/bin/list_members -r -o /home/backup/skydivemembreg
    skydive

    If a run this command from the command line everything works perfect. When
    cron runs the same command I get this error:

    File "/home/mailman/bin/list_members", line 79
    print >> sys.stderr, _(__doc__)
    ^
    SyntaxError: invalid syntax

    The server is a RedHat 7.1. Any clues?

    TIA,
    /David


    ------------------------------------------------------
    Mailman-Users mailing list
    Mailman-Users at python.org
    http://mail.python.org/mailman/listinfo/mailman-users
    Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
    Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
  • Barry A. Warsaw at Sep 13, 2002 at 3:15 pm
    "david" == <david at gof.se> writes:
    david> Sorry if this is a little bit of topic, but I don't know a
    david> better place to ask. I upgraded to Mailman 2.1b3 a week ago
    david> and run into som cron problems. When I did the upgrade I
    david> also upgraded Python to version 2.2.1

    Did you re-run configure and make sure that you're pointing at the
    Python 2.2.1 executable? If you're not sure, rerun configure
    --with-python.
    File "/home/mailman/bin/list_members", line 79
    print >> sys.stderr, _(__doc__)
    ^
    SyntaxError: invalid syntax
    david> The server is a RedHat 7.1. Any clues?

    You're cron scripts are pointed at an older Python, not at the 2.2.1
    you upgraded to.

    -Barry
  • David at Sep 13, 2002 at 3:41 pm
    Thanks. I had an old version in /usr/bin/ The job runs just fine when I
    pointed cron to /usr/local/bin/python

    Blue Skies,
    /David
    File "/home/mailman/bin/list_members", line 79
    print >> sys.stderr, _(__doc__)
    ^
    SyntaxError: invalid syntax
    david> The server is a RedHat 7.1. Any clues?

    You're cron scripts are pointed at an older Python, not at the 2.2.1
    you upgraded to.

    -Barry

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedSep 12, '02 at 8:41p
activeSep 13, '02 at 3:41p
posts4
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase