LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2012, 10:11 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Error message with two python scripts


Hello --

I am setting up a RoundUp ticket tracking server, and one of the components that I am trying to get to work is the email notification. There are two python scripts that can be used to this end. Each script is meant to be run as a cron job, and sends out notifications of open tickets. The scripts are attached to this posting.

I am testing each script by manually running it as root or non-root user using the following command syntax:

python <script>

I am encountering error messages when running either script. When I run the roundup-reminder script, the following error message is displayed on-screen:

Quote:
File "roundup-reminder.py", line 118
print >>body, '''
^
IndentationError: unindent does not match any outer indentation level
When I run the email_reminder script, the output is as follows:
Quote:
Traceback (most recent call last):
File "email_reminder.py", line 100, in <module>
reminders.run()
File "email_reminder.py", line 90, in run
self._email_reminder(nodeid)
File "email_reminder.py", line 65, in _email_reminder
author = (self.db.config.detectors['MAIL_FROM_NAME'], self.db.config.detectors['MAIL_FROM_ADDRESS'])
File "/usr/lib/pymodules/python2.6/roundup/configuration.py", line 1147, in __getitem__
return self._get_option(name).get()
File "/usr/lib/pymodules/python2.6/roundup/configuration.py", line 1029, in _get_option
raise InvalidOptionError(name)
roundup.configuration.InvalidOptionError: Unsupported configuration option: MAIL_FROM_NAME
The version of python that is installed on the server is:

Python 2.6.5

while that of the MySQL server is the following:

Ver 14.14 Distrib 5.1.63, for debian-linux-gnu (i486) using readline 6.1


Can someone lend a hand here?

Thanks.
Attached Files
File Type: txt roundup-reminder.txt (6.4 KB, 10 views)
File Type: txt email_reminder.txt (3.0 KB, 14 views)
 
Old 08-08-2012, 06:57 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
For the first one you seem to have switched to using 5 spaces for the indent starting at:
Code:
print >>body, '''
... it was 4 spaces further up.

For the second one you haven't posted the other modules you're importing but the error seems pretty obvious:
Code:
Unsupported configuration option: MAIL_FROM_NAME

Last edited by kbp; 08-08-2012 at 07:03 PM.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing python scripts using web ! noony123 Programming 7 03-19-2011 08:13 AM
Error message while installing rpm in python janarthananefx Linux - Newbie 3 04-21-2010 10:50 PM
Execute python scripts GameMaker Programming 2 02-09-2006 04:46 AM
compiling Python scripts lex1dr Linux - Software 1 06-16-2003 04:24 PM
enabling python scripts within Xchat nixdisciple Programming 8 06-07-2002 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration