[Zope] external method strangeness
garry saddington
garry at schoolteachers.co.uk
Wed Oct 18 13:43:32 EDT 2006
On Thu, 2006-10-19 at 03:18 +1000, Andrew Milton wrote:
> +-------[ garry saddington ]----------------------
> | Can anyone explain what is happening here. I am using Saxon to transform
> | an xml file(source) using a stylesheet(style) the result is then written
> | to Postgres. The contents of source are uploaded in Zope and passed to
> | the external method as a string. When I run this external method:
>
> [snip]
>
> | Can anyone point me in the correct direction?
>
> Text encoding?
The same files are used both times. The error log is not very helpful
here but I enclose it for completeness.
regards
garry
Log
Undo
Ownership
Security
Site Error Log Site Error Log at /error_log
Exception traceback
Time
2006/10/18 18:42:33.586 GMT+1
User Name (User Id)
scholarpack (scholarpack)
Request URL
http://localhost/scholarpack/admin/interoperability/upload/addCTF
Exception Type
ProgrammingError
Exception Value
Traceback (innermost last):
* Module ZPublisher.Publish, line 113, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 40, in call_object
* Module Shared.DC.Scripts.Bindings, line 311, in __call__
* Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
* Module Products.PythonScripts.PythonScript, line 323, in _exec
* Module None, line 11, in addCTF
<PythonScript
at /scholarpack/admin/interoperability/upload/addCTF>
Line 11
* Module OFS.DTMLMethod, line 144, in __call__
<DTMLMethod
at /scholarpack/admin/interoperability/upload/result>
URL:
http://localhost/scholarpack/admin/interoperability/upload/result/manage_main
Physical Path:/scholarpack/admin/interoperability/upload/result
* Module DocumentTemplate.DT_String, line 476, in __call__
* Module Shared.DC.Scripts.Bindings, line 325, in
__render_with_namespace__
* Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
* Module Products.PythonScripts.PythonScript, line 323, in _exec
* Module None, line 2, in test_html
<PythonScript
at /scholarpack/admin/interoperability/upload/test_html>
Line 2
* Module Products.ExternalMethod.ExternalMethod, line 225, in
__call__
__traceback_info__: (('<?xml version="1.0"
encoding="ISO-8859-1"?>\n<CTfile>\n<CTFpupilData >\n <Pupil>\n
<UPN>U925540006009</UPN>\n <Surname>Abara</Surname>\n
<Forename>Tonna</Forename>\n <DOB>1989-07-17</DOB>\n
<Gender>F</Gender>\n <BasicDetails>\n
<PreferredSurname>Abara</PreferredSurname>\n
<PreferredForename>Tona</PreferredForename>\n
<NCyearActual>12</NCyearActual>\n <Ethnicity>BAFR</Ethnicity>\n
<EthnicitySource>O</EthnicitySource>\n <Languages>\n <Type>\n
<LanguageQualifier>F</LanguageQualifier>\n
<Language>ENG</Language>\n </Type>\n </Languages>\n
<FSMeligible>false</FSMeligible>\n
<MedicalFlag>false</MedicalFlag>\n
<EnrolStatus>C</EnrolStatus>\n </BasicDetails>\n <Address>\n
<AddressLines>\n <Line1>H61 Road 42</Line1>\n <Line2>Victoria
Garden City</Line2>\n <Line3>Box 72675</Line3>\n <Line4>Victoria
Island</Line4>\n <Line5>Lagos</Line5>\n
<Country>Nigeria</Country>\n </AddressLines>\n </Address>\n
<Contacts>\n <Contact>\n <Title>Mr & Mrs</Title>\n
<Surname>Abara</Surname>\n <Relationship>FAM</Relationship>\n
<Responsibility>true</Responsibility>\n <Address>\n
<AddressAsPupil>true</AddressAsPupil>\n </Address>\n <Phones>\n
<Phone>\n <PhoneType>H</PhoneType>\n
<PhoneNo>014618466</PhoneNo>\n </Phone>\n <Phone>\n
<PhoneType>H</PhoneType>\n <PhoneNo>0208 5750766</PhoneNo>\n
</Phone>\n </Phones>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n
<RelLnkParentNo>1</RelLnkParentNo>\n
<StudentResident>true</StudentResident>\n
<FamilyMailMarker>true</FamilyMailMarker>\n <Salutation>Mr &
Mrs Abara</Salutation>\n </SuppInfo>\n </Contact>\n
</Contacts>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n
<RMMSAttendanceType>C</RMMSAttendanceType>\n <StudentDetails>\n
<Religion>n/s</Religion>\n
<LanguageAtHome>ENG</LanguageAtHome>\n </StudentDetails>\n
</SuppInfo>\n </Pupil>\n <Pupil>\n <UPN>U92554000501A</UPN>\n
<Surname>Abdullah</Surname>\n <Forename>Safaris</Forename>\n
<DOB>1995-07-08</DOB>\n <Gender>M</Gender>\n <BasicDetails>\n
<PreferredSurname>Abdullah</PreferredSurname>\n
<PreferredForename>Safaris</PreferredForename>\n
<NCyearActual>7</NCyearActual>\n <Ethnicity>MOTH</Ethnicity>\n
<EthnicitySource>T</EthnicitySource>\n <Languages>\n <Type>\n
<LanguageQualifier>F</LanguageQualifier>\n
<Language>ENG</Language>\n </Type>\n </Languages>\n
<FSMeligible>false</FSMeligible>\n
<MedicalFlag>false</MedicalFlag>\n
<EnrolStatus>C</EnrolStatus>\n </BasicDetails>\n <Address>\n
<AddressLines>\n <Line1>43 St Margarets Avenue</Line1>\n <Line2>
</Line2>\n <Line3> </Line3>\n <Line4>Skegness</Line4>\n
<Line5>Lincolnshire</Line5>\n <Postcode>PE25 2LX</Postcode>\n
<Country>England</Country>\n </AddressLines>\n </Address>\n
<Contacts>\n <Contact>\n <Title>Mrs</Title>\n
<Surname>Lilley</Surname>\n <Relationship>PAM</Relationship>\n
<Responsibility>true</Responsibility>\n <Address>\n
<AddressAsPupil>true</AddressAsPupil>\n </Address>\n <Phones>\n
<Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>01754
760193</PhoneNo>\n </Phone>\n <Phone>\n
<PhoneType>H</PhoneType>\n <PhoneNo>07783 538592</PhoneNo>\n
</Phone>\n </Phones>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n
<RelLnkParentNo>1</RelLnkParentNo>\n
<StudentResident>true</StudentResident>\n
<FamilyMailMarker>true</FamilyMailMarker>\n <Salutation>Mrs
Lilley</Salutation>\n </SuppInfo>\n </Contact>\n </Contacts>\n
<StageAssessments>\n <KeyStage>\n <Stage>KS3</Stage>\n
<StageAssessment>\n <Locale>ENG</Locale>\n <Year>2006</Year>\n
<KSsubject>ENG</KSsubject>\n <Method>47</Method>\n
<Component>SUB</Component>\n <ResultStatus>I</ResultStatus>\n
<ResultQualifier>NS</ResultQualifier>\n <Result>0</Result>\n
</StageAssessment>\n </KeyStage>\n </StageAssessments>\n
<SuppInfo>\n <SuppID>RMMS</SuppID>\n
<RMMSAttendanceType>C</RMMSAttendanceType>\n <StudentDetails>\n
<Religion>n/s</Religion>\n
<LanguageAtHome>ENG</LanguageAtHome>\n </StudentDetails>\n
</SuppInfo>\n </Pupil>\n</CTFpupilData>\n</CTfile>\n',), {},
None)
* Module /opt/scholarpack/instances/scholarpack/Extensions/pyana.py, line 18, in scholarpack_xml_transform
ProgrammingError:
Display traceback as text
REQUEST
form
submit
' Add '
id
'ctfxml'
file
'<?xml version="1.0"
encoding="ISO-8859-1"?>\n<CTfile>\n<CTFpupilData >\n <Pupil>\n <UPN>U925540006009</UPN>\n <Surname>Abara</Surname>\n <Forename>Tonna</Forename>\n <DOB>1989-07-17</DOB>\n <Gender>F</Gender>\n <BasicDetails>\n <PreferredSurname>Abara</PreferredSurname>\n <PreferredForename>Tona</PreferredForename>\n <NCyearActual>12</NCyearActual>\n <Ethnicity>BAFR</Ethnicity>\n <EthnicitySource>O</EthnicitySource>\n <Languages>\n <Type>\n <LanguageQualifier>F</LanguageQualifier>\n <Language>ENG</Language>\n </Type>\n </Languages>\n <FSMeligible>false</FSMeligible>\n <MedicalFlag>false</MedicalFlag>\n <EnrolStatus>C</EnrolStatus>\n </BasicDetails>\n <Address>\n <AddressLines>\n <Line1>H61 Road 42</Line1>\n <Line2>Victoria Garden City</Line2>\n <Line3>Box 72675</Line3>\n <Line4>Victoria Island</Line4>\n <Line5>Lagos</Line5>\n <Country>Nigeria</Country>\n </AddressLines>\n </Address>\n <Contacts>\n <Contact>\n <Title>Mr & Mrs</Title>\n <Surname>Abara</Surname>\n <Relationship>FAM</Relationship>\n <Responsibility>true</Responsibility>\n <Address>\n <AddressAsPupil>true</AddressAsPupil>\n </Address>\n <Phones>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>014618466</PhoneNo>\n </Phone>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>0208 5750766</PhoneNo>\n </Phone>\n </Phones>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RelLnkParentNo>1</RelLnkParentNo>\n <StudentResident>true</StudentResident>\n <FamilyMailMarker>true</FamilyMailMarker>\n <Salutation>Mr & Mrs Abara</Salutation>\n </SuppInfo>\n </Contact>\n </Contacts>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RMMSAttendanceType>C</RMMSAttendanceType>\n <StudentDetails>\n <Religion>n/s</Religion>\n <LanguageAtHome>ENG</LanguageAtHome>\n </StudentDetails>\n </SuppInfo>\n </Pupil>\n <Pupil>\n <UPN>U92554000501A</UPN>\n <Surname>Abdullah</Surname>\n <Forename>Safaris</Forename>\n <DOB>1995-07-08</DOB>\n <Gender>M</Gender>\n <BasicDetails>\n <PreferredSurname>Abdullah</PreferredSurname>\n <PreferredForename>Safaris</PreferredForename>\n <NCyearActual>7</NCyearActual>\n <Ethnicity>MOTH</Ethnicity>\n <EthnicitySource>T</EthnicitySource>\n <Languages>\n <Type>\n <LanguageQualifier>F</LanguageQualifier>\n <Language>ENG</Language>\n </Type>\n </Languages>\n <FSMeligible>false</FSMeligible>\n <MedicalFlag>false</MedicalFlag>\n <EnrolStatus>C</EnrolStatus>\n </BasicDetails>\n <Address>\n <AddressLines>\n <Line1>43 St Margarets Avenue</Line1>\n <Line2> </Line2>\n <Line3> </Line3>\n <Line4>Skegness</Line4>\n <Line5>Lincolnshire</Line5>\n <Postcode>PE25 2LX</Postcode>\n <Country>England</Country>\n </AddressLines>\n </Address>\n <Contacts>\n <Contact>\n <Title>Mrs</Title>\n <Surname>Lilley</Surname>\n <Relationship>PAM</Relationship>\n <Responsibility>true</Responsibility>\n <Address>\n <AddressAsPupil>true</AddressAsPupil>\n </Address>\n <Phones>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>01754 760193</PhoneNo>\n </Phone>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>07783 538592</PhoneNo>\n </Phone>\n </Phones>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RelLnkParentNo>1</RelLnkParentNo>\n <StudentResident>true</StudentResident>\n <FamilyMailMarker>true</FamilyMailMarker>\n <Salutation>Mrs Lilley</Salutation>\n </SuppInfo>\n </Contact>\n </Contacts>\n <StageAssessments>\n <KeyStage>\n <Stage>KS3</Stage>\n <StageAssessment>\n <Locale>ENG</Locale>\n <Year>2006</Year>\n <KSsubject>ENG</KSsubject>\n <Method>47</Method>\n <Component>SUB</Component>\n <ResultStatus>I</ResultStatus>\n <ResultQualifier>NS</ResultQualifier>\n <Result>0</Result>\n </StageAssessment>\n </KeyStage>\n </StageAssessments>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RMMSAttendanceType>C</RMMSAttendanceType>\n <StudentDetails>\n <Religion>n/s</Religion>\n <LanguageAtHome>ENG</LanguageAtHome>\n </StudentDetails>\n </SuppInfo>\n </Pupil>\n</CTFpupilData>\n</CTfile>\n'
cookies
dtpref_rows
'20'
dtpref_cols
'100%'
tree-s
'eJzTyCkw5NLIKTDiClZ3hANXW3WuAmOuRKCECUjWFEk20CMQJGsGljUHyVogy3qVg2QtuRLBQA8AguIYaQ'
lazy items
SESSION
<bound method
SessionDataManager.getSessionData of
<SessionDataManager
at /session_data_manager>>
other
TraversalRequestNameStack
[]
AUTHENTICATED_USER
scholarpack
URL
'http://localhost/scholarpack/admin/interoperability/upload/addCTF'
SERVER_URL
'http://localhost'
AUTHENTICATION_PATH
''
traverse_subpath
[]
file
'<?xml version="1.0"
encoding="ISO-8859-1"?>\n<CTfile>\n<CTFpupilData >\n <Pupil>\n <UPN>U925540006009</UPN>\n <Surname>Abara</Surname>\n <Forename>Tonna</Forename>\n <DOB>1989-07-17</DOB>\n <Gender>F</Gender>\n <BasicDetails>\n <PreferredSurname>Abara</PreferredSurname>\n <PreferredForename>Tona</PreferredForename>\n <NCyearActual>12</NCyearActual>\n <Ethnicity>BAFR</Ethnicity>\n <EthnicitySource>O</EthnicitySource>\n <Languages>\n <Type>\n <LanguageQualifier>F</LanguageQualifier>\n <Language>ENG</Language>\n </Type>\n </Languages>\n <FSMeligible>false</FSMeligible>\n <MedicalFlag>false</MedicalFlag>\n <EnrolStatus>C</EnrolStatus>\n </BasicDetails>\n <Address>\n <AddressLines>\n <Line1>H61 Road 42</Line1>\n <Line2>Victoria Garden City</Line2>\n <Line3>Box 72675</Line3>\n <Line4>Victoria Island</Line4>\n <Line5>Lagos</Line5>\n <Country>Nigeria</Country>\n </AddressLines>\n </Address>\n <Contacts>\n <Contact>\n <Title>Mr & Mrs</Title>\n <Surname>Abara</Surname>\n <Relationship>FAM</Relationship>\n <Responsibility>true</Responsibility>\n <Address>\n <AddressAsPupil>true</AddressAsPupil>\n </Address>\n <Phones>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>014618466</PhoneNo>\n </Phone>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>0208 5750766</PhoneNo>\n </Phone>\n </Phones>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RelLnkParentNo>1</RelLnkParentNo>\n <StudentResident>true</StudentResident>\n <FamilyMailMarker>true</FamilyMailMarker>\n <Salutation>Mr & Mrs Abara</Salutation>\n </SuppInfo>\n </Contact>\n </Contacts>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RMMSAttendanceType>C</RMMSAttendanceType>\n <StudentDetails>\n <Religion>n/s</Religion>\n <LanguageAtHome>ENG</LanguageAtHome>\n </StudentDetails>\n </SuppInfo>\n </Pupil>\n <Pupil>\n <UPN>U92554000501A</UPN>\n <Surname>Abdullah</Surname>\n <Forename>Safaris</Forename>\n <DOB>1995-07-08</DOB>\n <Gender>M</Gender>\n <BasicDetails>\n <PreferredSurname>Abdullah</PreferredSurname>\n <PreferredForename>Safaris</PreferredForename>\n <NCyearActual>7</NCyearActual>\n <Ethnicity>MOTH</Ethnicity>\n <EthnicitySource>T</EthnicitySource>\n <Languages>\n <Type>\n <LanguageQualifier>F</LanguageQualifier>\n <Language>ENG</Language>\n </Type>\n </Languages>\n <FSMeligible>false</FSMeligible>\n <MedicalFlag>false</MedicalFlag>\n <EnrolStatus>C</EnrolStatus>\n </BasicDetails>\n <Address>\n <AddressLines>\n <Line1>43 St Margarets Avenue</Line1>\n <Line2> </Line2>\n <Line3> </Line3>\n <Line4>Skegness</Line4>\n <Line5>Lincolnshire</Line5>\n <Postcode>PE25 2LX</Postcode>\n <Country>England</Country>\n </AddressLines>\n </Address>\n <Contacts>\n <Contact>\n <Title>Mrs</Title>\n <Surname>Lilley</Surname>\n <Relationship>PAM</Relationship>\n <Responsibility>true</Responsibility>\n <Address>\n <AddressAsPupil>true</AddressAsPupil>\n </Address>\n <Phones>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>01754 760193</PhoneNo>\n </Phone>\n <Phone>\n <PhoneType>H</PhoneType>\n <PhoneNo>07783 538592</PhoneNo>\n </Phone>\n </Phones>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RelLnkParentNo>1</RelLnkParentNo>\n <StudentResident>true</StudentResident>\n <FamilyMailMarker>true</FamilyMailMarker>\n <Salutation>Mrs Lilley</Salutation>\n </SuppInfo>\n </Contact>\n </Contacts>\n <StageAssessments>\n <KeyStage>\n <Stage>KS3</Stage>\n <StageAssessment>\n <Locale>ENG</Locale>\n <Year>2006</Year>\n <KSsubject>ENG</KSsubject>\n <Method>47</Method>\n <Component>SUB</Component>\n <ResultStatus>I</ResultStatus>\n <ResultQualifier>NS</ResultQualifier>\n <Result>0</Result>\n </StageAssessment>\n </KeyStage>\n </StageAssessments>\n <SuppInfo>\n <SuppID>RMMS</SuppID>\n <RMMSAttendanceType>C</RMMSAttendanceType>\n <StudentDetails>\n <Religion>n/s</Religion>\n <LanguageAtHome>ENG</LanguageAtHome>\n </StudentDetails>\n </SuppInfo>\n </Pupil>\n</CTFpupilData>\n</CTfile>\n'
PUBLISHED
<PythonScript
at /scholarpack/admin/interoperability/upload/addCTF>
ACTUAL_URL
'http://localhost/scholarpack/admin/interoperability/upload/addCTF'
URL0
http://localhost/scholarpack/admin/interoperability/upload/addCTF
URL1
http://localhost/scholarpack/admin/interoperability/upload
URL2
http://localhost/scholarpack/admin/interoperability
URL3
http://localhost/scholarpack/admin
URL4
http://localhost/scholarpack
URL5
http://localhost
BASE0
http://localhost
BASE1
http://localhost
BASE2
http://localhost/scholarpack
BASE3
http://localhost/scholarpack/admin
BASE4
http://localhost/scholarpack/admin/interoperability
BASE5
http://localhost/scholarpack/admin/interoperability/upload
BASE6
http://localhost/scholarpack/admin/interoperability/upload/addCTF
environ
HTTP_COOKIE
'dtpref_cols="100%";
dtpref_rows="20";
tree-s="eJzTyCkw5NLIKTDiClZ3hANXW3WuAmOuRKCECUjWFEk20CMQJGsGljUHyVogy3qVg2QtuRLBQA8AguIYaQ"'
SERVER_SOFTWARE
'Zope/(Zope 2.8.1-final, python
2.4.2, linux2) ZServer/1.1'
SCRIPT_NAME
''
REQUEST_METHOD
'POST'
HTTP_KEEP_ALIVE
'300'
SERVER_PROTOCOL
'HTTP/1.1'
channel.creation_time
1161193342
CONNECTION_TYPE
'keep-alive'
HTTP_ACCEPT_CHARSET
'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
HTTP_USER_AGENT
'Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.8.0.7) Gecko/20060921
Ubuntu/dapper-security
Firefox/1.5.0.7'
HTTP_REFERER
'http://localhost/scholarpack/admin/interoperability/upload'
SERVER_NAME
'0.0.0.0'
REMOTE_ADDR
'127.0.0.1'
PATH_TRANSLATED
'/scholarpack/admin/interoperability/upload/addCTF'
SERVER_PORT
'80'
CONTENT_LENGTH
'6219'
HTTP_HOST
'localhost'
HTTP_ACCEPT
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_ACCEPT_LANGUAGE
'en-us,en;q=0.5'
CONTENT_TYPE
'multipart/form-data;
boundary=---------------------------157551476518702369471701174458'
HTTP_ACCEPT_ENCODING
'gzip,deflate'
PATH_INFO
'/scholarpack/admin/interoperability/upload/addCTF'
More information about the Zope
mailing list