[Zope-dev] Sybase 11.9.2 with Zope 2.2.0

Ralph Heinkel heinkel@cenix-bioscience.com
Fri, 3 Nov 2000 15:59:13 +0100


Hi, 

I'm trying to run Sybase 11.9.2 with Zope 2.2.0. using SybaseDA2.0b2 Everything
was fine with Zope 2.1.6 so far. But with this new version of Zope I get an
error like (having commented out the try/except clause to catch it - traceback
appended to this mail):

Error Type: AttributeError
             Error Value: 'string' object has no attribute 'server'

The error is raised because in the Sybase Adapter an attribute 'server' of
connection_string is accessed. 
Looking at the 2.1.6 code of Connection.py I found two new lines, which convert
connection_string into a real string. Commenting out these lines makes
everything work. But: IS THIS SAFE? connection_string is of type
ZPublisher.HTTPRequest.record before the str() conversion.

    manage_properties=HTMLFile('connectionEdit', globals())
    def manage_edit(self, title, connection_string, check=None, REQUEST=None):
        """Change connection
        """
#       title=str(title)                             <--- 'bad' lines
#       connection_string=str(connection_string)     <--- 'bad' lines
        self.edit(title, connection_string, check)
        if REQUEST is not None:

Any comments would be appreciated.

-- 
------------------------------------------------------------------
Ralph Heinkel                  Cenix Bioscience GmbH
Director of the IT-Unit        Tel  : +49 6221/387 915
Meyerhofstr. 1                 Fax  : +49 6221/387 971
69117 Heidelberg, Germany      eMail: heinkel@cenix-bioscience.com







Traceback (innermost last):
  File /opt/src/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /opt/src/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 187, in publish
  File /opt/src/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 171, in publish
  File /opt/src/Zope-2.2.0-src/lib/python/ZPublisher/mapply.py, line 160, in mapply
    (Object: manage_edit)
  File /opt/src/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 112, in call_object
    (Object: manage_edit)
  File /opt/src/Zope-2.2.0-src/lib/python/Shared/DC/ZRDB/Connection.py, line 168, in manage_edit
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/Shared/DC/ZRDB/Connection.py, line 160, in edit
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/Shared/DC/ZRDB/Connection.py, line 231, in connect
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/Products/SybaseDAv2/db.py, line 135, in __init__
AttributeError: (see above)