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: [EMAIL PROTECTED]

Traceback (innermost last):
  File /opt/src/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line 222, in 
  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 
    (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 
    (Object: manage_edit)
  File /opt/src/Zope-2.2.0-src/lib/python/Shared/DC/ZRDB/Connection.py, line 168, in 
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/Shared/DC/ZRDB/Connection.py, line 160, in 
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/Shared/DC/ZRDB/Connection.py, line 231, in 
    (Object: RoleManager)
  File /opt/src/Zope-2.2.0-src/lib/python/Products/SybaseDAv2/db.py, line 135, in 
AttributeError: (see above)

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to