[ZCM] [ZC] 1165/ 1 Request "DTML(Unicode)"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Wed Jan 7 00:14:11 EST 2004
Issue #1165 Update (Request) "DTML(Unicode)"
Status Pending, Zope/bug critical
To followup, visit:
http://collector.zope.org/Zope/1165
==============================================================
= Request - Entry #1 by lozinski on Jan 7, 2004 12:14 am
I am trying to develop Unicode web pages, with variable names substituted in using the DTML technology. Sadly it does not work.
#HERE IS THE CODE FOR a PYTHON SCRIPT WHICH CRASHES
from Products.PythonScripts.standard import DTML
request = container.REQUEST
RESPONSE = request.RESPONSE
# THE FOLLOWING LINE WORKS, DEMONSTRATING MY SCRIPT IS CORRECT
#FOR ASCII STRINGS PASSED TO THE DTML COMMAND.
#myString = 'Hello <dtml-var id>'
#BUT IF YOU USE THE FOLLOWING LINE INSTEAD IT CRASHES
#WHICH DEMONSTRATES THAT DTML(unicode) needs work.
myString=_.unicode('Hello <dtml-var id>')
myDTML = DTML(myString)
return myDTML(context,request)
HERE ARE THE ERROR MESSAGES
2004/01/07 05:04:02.611 GMT
User Name (User Id) lozinski (lozinski)
Request URL http://ceo.jobmart.com/Resumes/TestDTML
Exception Type TypeError
Exception Value object of type 'unicode' is not callable
Traceback (innermost last):
* Module ZPublisher.Publish, line 98, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 39, in call_object
* Module Shared.DC.Scripts.Bindings, line 252, in __call__
* Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
* Module Products.PythonScripts.PythonScript, line 314, in _exec
* Module Script (Python), line 12, in TestDTML
<PythonScript at /Localizer/jobmart/CEO/Resumes/TestDTML>
Line 12
* Module Products.PythonScripts.standard, line 52, in __call__
* Module DocumentTemplate.DT_String, line 474, in __call__
TypeError: object of type 'unicode' is not callable
Display traceback as text
REQUEST
form
cookies
lazy items
SESSION <bound method SessionDataManager.getSessionData of <SessionDataManager instance at 8e26300>>
other
AUTHENTICATION_PATH 'Localizer/jobmart'
AcceptCharset <Products.Localizer.Accept.AcceptCharset instance at 0x91c530c>
AcceptLanguage <Products.Localizer.Accept.AcceptLanguage instance at 0x91c564c>
PUBLISHED <PythonScript at /Localizer/jobmart/CEO/Resumes/TestDTML>
BASE3 'http://ceo.jobmart.com/Resumes/TestDTML'
URL2 'http://ceo.jobmart.com'
BASE1 'http://ceo.jobmart.com'
traverse_subpath []
URL1 'http://ceo.jobmart.com/Resumes'
SERVER_URL 'http://ceo.jobmart.com'
VirtualRootPhysicalPath ('', 'Localizer', 'jobmart', 'CEO')
USER_PREF_LANGUAGES <Products.Localizer.Accept.AcceptLanguage instance at 0x91c564c>
URL 'http://ceo.jobmart.com/Resumes/TestDTML'
BASE2 'http://ceo.jobmart.com/Resumes'
TraversalRequestNameStack []
AUTHENTICATED_USER lozinski
SELECTED_LANGUAGE 'en'
URL0 http://ceo.jobmart.com/Resumes/TestDTML
URL1 http://ceo.jobmart.com/Resumes
URL2 http://ceo.jobmart.com
BASE0 http://ceo.jobmart.com
BASE1 http://ceo.jobmart.com
BASE2 http://ceo.jobmart.com/Resumes
BASE3 http://ceo.jobmart.com/Resumes/TestDTML
environ
HTTP_ACCEPT_ENCODING 'gzip, deflate, compress;q=0.9'
SERVER_PORT '8080'
PATH_TRANSLATED '/VirtualHostBase/http/ceo.jobmart.com:80/Resumes/TestDTML'
HTTP_ACCEPT 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1'
GATEWAY_INTERFACE 'CGI/1.1'
HTTP_X_FORWARDED_HOST 'ceo.jobmart.com'
HTTP_ACCEPT_LANGUAGE 'en-us, en;q=0.50'
HTTP_X_FORWARDED_FOR '66.1.138.84'
REMOTE_ADDR '192.168.1.67'
SERVER_NAME 'imeme'
HTTP_USER_AGENT 'Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.1) Gecko/20020830'
HTTP_ACCEPT_CHARSET 'UTF-8, *'
CONNECTION_TYPE 'close'
channel.creation_time 1073451842
SERVER_PROTOCOL 'HTTP/1.1'
PATH_INFO '/VirtualHostBase/http/ceo.jobmart.com:80/Resumes/TestDTML'
HTTP_HOST '127.0.0.1:8080'
REQUEST_METHOD 'GET'
SCRIPT_NAME ''
SERVER_SOFTWARE 'Zope/(Zope 2.6.2 (source release, python 2.1, linux2), python 2.1.3, freebsd4) ZServer/1.1b1'
HTTP_REFERER 'http://ceo.jobmart.com/Resumes/TestDTML'
HTTP_X_FORWARDED_SERVER '192.168.1.67'
==============================================================
More information about the Zope-Collector-Monitor
mailing list