tmda-cgi, 'unicode' object has no attribute 'Expand'
David Ford <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Organization | Blue Labs |
| Message-ID | <[email protected]> |
side note prefixing my problem:
I've a few trivial changes to tmda-cgi.c
Add includes for <stdio.h> and <unistd.h> for prototyping and replace
'0' with (char *) NULL to terminate the execl() call on line 51.
[...]
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <tmda-cgi.h>
[...]
execl(PYTHON, PYTHON, "tmda-cgi.py", (char *) NULL );
[...]
That aside, I have the following problem:
*AttributeError* Python 2.4.3: /usr/bin/python
Fri Oct 20 13:08:48 2006
A problem occurred in a Python script. Here is the sequence of function
calls leading up to the error, in the order they occurred.
/usr/src/tmda-cgi-0.15/tmda-cgi.py
<file:///usr/src/tmda-cgi-0.15/tmda-cgi.py>
188 elif Cmd == "pending":
189 import PendList
190 Call(PendList)
191 elif Cmd == "restore":
192 pass
*Call* = <function Call>, *PendList* = <module 'PendList' from
'/usr/src/tmda-cgi-0.15/PendList.py'>
/usr/src/tmda-cgi-0.15/tmda-cgi.py
<file:///usr/src/tmda-cgi-0.15/tmda-cgi.py> in *Call*(Library=<module
'PendList' from '/usr/src/tmda-cgi-0.15/PendList.py'>, Str=None)
86 Library.Show(Str)
87 else:
88 Library.Show()
89
90 # Capture WebUID
*Library* = <module 'PendList' from
'/usr/src/tmda-cgi-0.15/PendList.py'>, Library.*Show* = <function Show>
/usr/src/tmda-cgi-0.15/PendList.py
<file:///usr/src/tmda-cgi-0.15/PendList.py> in *Show*()
636 ScRadio.Add()
637
638 Row.Add()
639 Count = Count + 1
640
*Row* = <Template.Template instance>, Row.*Add* = <bound method
Template.Add of <Template.Template instance>>
/usr/src/tmda-cgi-0.15/Template.py
<file:///usr/src/tmda-cgi-0.15/Template.py> in
*Add*(self=<Template.Template instance>, Dict={'CharSet': 'utf-8',
'CheckName': 'c246', 'Date': 'Tue 10/17', 'DispDir': '/display',
'DispRange': '1-500 of 1266', 'ErrMsg': "Capturing the debug
stream...\nSetting up file au...se: OK ['Logged in.']\nAuthentication
returned: 1\n", 'FilterOptions': '', 'Info': '©2003 Jim Ramsay,
based on the Official TMDA Logo', 'MsgClass': 'NewMsg', 'MsgID':
'1161085102.3718', ...})
268 if not Dict: Dict = self.Dict
269 self.HTML.append(copy.deepcopy(self.BoilerPlate))
270 self.Expand(Dict)
271
272 def Clear(self):
*self* = <Template.Template instance>, self.*Expand* = <bound method
Template.Expand of <Template.Template instance>>, *Dict* = {'CharSet':
'utf-8', 'CheckName': 'c246', 'Date': 'Tue 10/17', 'DispDir':
'/display', 'DispRange': '1-500 of 1266', 'ErrMsg': "Capturing the debug
stream...\nSetting up file au...se: OK ['Logged in.']\nAuthentication
returned: 1\n", 'FilterOptions': '', 'Info': '©2003 Jim Ramsay,
based on the Official TMDA Logo', 'MsgClass': 'NewMsg', 'MsgID':
'1161085102.3718', ...}
/usr/src/tmda-cgi-0.15/Template.py
<file:///usr/src/tmda-cgi-0.15/Template.py> in
*Expand*(self=<Template.Template instance>, Dict={'CharSet': 'utf-8',
'CheckName': 'c246', 'Date': 'Tue 10/17', 'DispDir': '/display',
'DispRange': '1-500 of 1266', 'ErrMsg': "Capturing the debug
stream...\nSetting up file au...se: OK ['Logged in.']\nAuthentication
returned: 1\n", 'FilterOptions': '', 'Info': '©2003 Jim Ramsay,
based on the Official TMDA Logo', 'MsgClass': 'NewMsg', 'MsgID':
'1161085102.3718', ...})
260 self.LonePctSearch.sub(self.LonePctRepl, self.HTML[i]) % Dict
261 else:
262 self.HTML[i].Expand(Dict)
263 self.BeenExpanded = 1
264 return self
*self* = <Template.Template instance>, self.*HTML* = [<Template.Template
instance>, <Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, <Template.Template instance>,
<Template.Template instance>, ...], *i* = 245, ].Expand /undefined/,
*Dict* = {'CharSet': 'utf-8', 'CheckName': 'c246', 'Date': 'Tue 10/17',
'DispDir': '/display', 'DispRange': '1-500 of 1266', 'ErrMsg':
"Capturing the debug stream...\nSetting up file au...se: OK ['Logged
in.']\nAuthentication returned: 1\n", 'FilterOptions': '', 'Info':
'©2003 Jim Ramsay, based on the Official TMDA Logo', 'MsgClass':
'NewMsg', 'MsgID': '1161085102.3718', ...}
/usr/src/tmda-cgi-0.15/Template.py
<file:///usr/src/tmda-cgi-0.15/Template.py> in
*Expand*(self=<Template.Template instance>, Dict={'CharSet': 'utf-8',
'CheckName': 'c246', 'Date': 'Tue 10/17', 'DispDir': '/display',
'DispRange': '1-500 of 1266', 'ErrMsg': "Capturing the debug
stream...\nSetting up file au...se: OK ['Logged in.']\nAuthentication
returned: 1\n", 'FilterOptions': '', 'Info': '©2003 Jim Ramsay,
based on the Official TMDA Logo', 'MsgClass': 'NewMsg', 'MsgID':
'1161085102.3718', ...})
260 self.LonePctSearch.sub(self.LonePctRepl, self.HTML[i]) % Dict
261 else:
262 self.HTML[i].Expand(Dict)
263 self.BeenExpanded = 1
264 return self
*self* = <Template.Template instance>, self.*HTML* = [u'\n <tr
class="NewMsg" bgcolor="#FFFFFF"\n ...g-right: 5px">\n -\n </td>\n '],
*i* = 0, ].Expand /undefined/, *Dict* = {'CharSet': 'utf-8',
'CheckName': 'c246', 'Date': 'Tue 10/17', 'DispDir': '/display',
'DispRange': '1-500 of 1266', 'ErrMsg': "Capturing the debug
stream...\nSetting up file au...se: OK ['Logged in.']\nAuthentication
returned: 1\n", 'FilterOptions': '', 'Info': '©2003 Jim Ramsay,
based on the Official TMDA Logo', 'MsgClass': 'NewMsg', 'MsgID':
'1161085102.3718', ...}
*AttributeError*: 'unicode' object has no attribute 'Expand'
args = ("'unicode' object has no attribute 'Expand'",)
More help please? :)
-david