[egenix-users] encoding problem with mxODBC and zope

robert rottermann robert at redcor.ch
Wed Nov 21 08:43:16 CET 2007


hi there,
I am having problems with mxODBC and zope.

this is the relevant line from the traceback
ProgrammingError: ('42000', 2403, "[unixODBC][FreeTDS][SQL
Server]WARNING! Some character(s) could not be converted into client's
character set. Unconverted bytes were changed to question marks ('?').",
4543)

in zope I have told mxODBCZopeDA to ignore warnings. this makes no
difference

we are using :
    mxODBCZopeDA-1.0.10

things work fine if I do not get all of the records from the MsSQL Server.
as soon as I try to get all I get the error.

Is there a way to have mxODBCZopeDA to log what it gets from the
MsSQL-Server?

What can I do to have mxODBCZopeDA not raising an error (so I have a
chance to see the bad record)?
Better yet, what can I do to fix the error?

thanks
robert

the odbc.ini entry:
-------------------
Description             = adressen
Driver          = TDS
Trace           = yes
TraceFile               = sql.log
Database                = IntranetApplication
Servername              = CHSRV26
UserName                = ~Intranet_info_user
Password                = XXXXX

the entry in /usr/etc/freetds.conf
----------------------------------
[CHSRV26]
        host = 172.16.2.75
        port = 1433
        tds version = 8.0
        client charset = ISO-8859-1


the whole traceback:
-------------------

2007-11-21 06:52:26 ERROR Zope.SiteErrorLog
http://zehnder2:8080/zehnderi/zehnderi/quicklinks/address-library
Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.PageTemplates.ZopePageTemplate, line 255, in _exec
  Module Products.CacheSetup.patch_cmf, line 123, in PT_pt_render
  Module TAL.TALInterpreter, line 238, in __call__
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 749, in do_useMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 780, in do_defineSlot
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 457, in do_optTag_tal
  Module TAL.TALInterpreter, line 442, in do_optTag
  Module TAL.TALInterpreter, line 437, in no_tag
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 728, in do_defineMacro
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 772, in do_defineSlot
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 647, in do_insertStructure_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: /zehnderi/zehnderi/quicklinks/address-library
   - Line 17, Column 8
   - Expression: standard:'context/show_records_address_form'
   - Names:
      {'container': <ATFolder at /zehnderi/zehnderi/quicklinks>,
       'context': <ATFolder at /zehnderi/zehnderi/quicklinks>,
       'default': <Products.PageTemplates.TALES.Default instance at
0xb742c0cc>,
       'here': <ATFolder at /zehnderi/zehnderi/quicklinks>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at
0xd151d2c>,
       'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb745320c>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0xd151d2c>,
       'request': <HTTPRequest,
URL=http://zehnder2:8080/zehnderi/zehnderi/quicklinks/address-library>,
       'root': <Application at >,
       'template': <ZopePageTemplate at
/zehnderi/zehnderi/quicklinks/address-library>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'robert'>}
  Module Products.PageTemplates.Expressions, line 185, in __call__
  Module Products.PageTemplates.Expressions, line 180, in _eval
  Module Products.PageTemplates.Expressions, line 77, in render
  Module Products.PageTemplates.ZRPythonExpr, line 76, in call_with_ns
  Module Shared.DC.Scripts.Bindings, line 325, in __render_with_namespace__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 195, in _exec
  Module Products.CacheSetup.patch_cmf, line 48, in FSPT_pt_render
  Module Products.CacheSetup.patch_cmf, line 123, in PT_pt_render
  Module TAL.TALInterpreter, line 238, in __call__
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 507, in do_setLocal_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: file:ZehnderiData/skins/zehnderi/db/show_records_address_form.pt
   - Line 13, Column 4
   - Expression: <PythonExpr context.show_records_address(search,
request.get('submitted'))>
   - Names:
      {'container': <PloneSite at /zehnderi/zehnderi>,
       'context': <ATFolder at /zehnderi/zehnderi/quicklinks>,
       'default': <Products.PageTemplates.TALES.Default instance at
0xb742c0cc>,
       'here': <ATFolder at /zehnderi/zehnderi/quicklinks>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at
0xd27c94c>,
       'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0xb745320c>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0xd27c94c>,
       'request': <HTTPRequest,
URL=http://zehnder2:8080/zehnderi/zehnderi/quicklinks/address-library>,
       'root': <Application at >,
       'template': <FSPageTemplate at
/zehnderi/zehnderi/show_records_address_form used for
/zehnderi/zehnderi/quicklinks>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'robert'>}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: context.show_records_address(search,
request.get('submitted'))
  Module Python expression "context.show_records_address(search,
request.get('submitted'))", line 1, in <expression>
  Module Products.CMFCore.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 164, in _exec
  Module None, line 13, in show_records_address
   - <FSPythonScript at /zehnderi/zehnderi/show_records_address used for
/zehnderi/zehnderi/quicklinks>
   - Line 13
  Module Shared.DC.ZRDB.DA, line 494, in __call__
   - <SQL at /zehnderi/zehnderi/address used for
/zehnderi/zehnderi/quicklinks>
  Module Products.mxODBCZopeDA.ZopeDA, line 1503, in query
  Module Products.mxODBCZopeDA.ZopeDA, line 1400, in run_cursor_callback
  Module Products.mxODBCZopeDA.ZopeDA, line 999, in errorhandler
ProgrammingError: ('42000', 2403, "[unixODBC][FreeTDS][SQL
Server]WARNING! Some character(s) could not be converted into client's
character set. Unconverted bytes were changed to question marks ('?').",
4543)
Traceback (most recent call last):
  File
"/home/zopeintranet/Zope-2.9.8-final/lib/python/zExceptions/ExceptionFormatter.py",
line 156, in formatLine
    supp = factory(*args)
TypeError: __init__() takes exactly 2 arguments (3 given)
Traceback (most recent call last):
  File
"/home/zopeintranet/Zope-2.9.8-final/lib/python/zExceptions/ExceptionFormatter.py",
line 156, in formatLine
    supp = factory(*args)
TypeError: __init__() takes exactly 2 arguments (3 given)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: robert.vcf
Type: text/x-vcard
Size: 211 bytes
Desc: not available
Url : /mailman-archives/egenix-users/attachments/20071121/ae09abc1/robert.vcf


More information about the egenix-users mailing list