[Scratchy-user] maybe bug?
Status: Beta
Brought to you by:
phil_schwartz
|
From: User P. <pa...@id...> - 2005-05-06 07:41:21
|
Hello,
I set up scratchy in my crontab :
/usr/local/bin/python /root/scratchy/parse.py -c /root/scratchy/config
and i got the error :
Traceback (most recent call last):
File "/root/scratchy/parse.py", line 1041, in ?
log.create_reports(date_tuples)
File "/root/scratchy/parse.py", line 628, in create_reports
self.cursor)
File "/root/scratchy/report.py", line 135, in __init__
self.create_report()
File "/root/scratchy/report.py", line 339, in create_report
html += self.get_template(self.prefs.get('TEMPLATE_REPORT'))
File "/root/scratchy/report.py", line 479, in get_template
fp = open(filename)
IOError: [Errno 2] No such file or directory: 'misc/template_report'
i dont know about python or your script, but with google help, i ve added
the followin line in the beginning of report.py :
pathname, scriptname = os.path.split(sys.argv[0])
pathname = os.path.abspath(pathname)
os.chdir(pathname)
and this modif seems to help
Regards
Patrice
|