Menu

ZMySQLda 2.0.8 FreeBSD "server_capabilities"

Help
2003-01-03
2012-09-19
  • Torbjorn Kristoffersen

    I'm having a problem with:

    Zope 2.6.0 + ZMySQLda 2.0.8 + MySQL-python

    On a FreeBSD 4.6 system.

    I think I followed the instructions.  I installed the thread_safe MySQL library from the ports collection, then MySQL-python.  I tested this module in Python, and connections/queries worked fine.

    Then I extracted ZMySQLda into the Zope directory. I started Zope, and tried to create a "Z MySQL Database Connection".  I'm sure the database works fine, I've tested it with the MySQL-python module.

    My connection string is:

    mydatabase@mysql.foobar.com myuser mypassword

    I then get the following Zope error:

    Error Type: AttributeError
    Error Value: server_capabilities

    Any ideas what might be wrong? Thanks!

     
    • Jeremy Cowgar

      Jeremy Cowgar - 2003-03-26

      I am having the same problem. I did get it to function. in lib/python/Products/ZMySQLdb/db.py on line 183 is the offending line (for me). I did a grep for server_capabilities on *.py and it found the line for me. Mine reads:

      self.transactions = self.db.server_capabilities & CLIENT.TRANSACTIONS

      but I changed it to:

      self.transactions = 0 #self.db.server_capabilities & CLIENT.TRANSACTIONS

      Now, I'm not suggesting this is the best thing, nor do I really know what that line of code was sopose to do, but I do know I will not be using transactions in my app, and the very next line reads:

              if self._try_transactions == '-':
                  self.transactions = 0

      I already had a - in my connection string, so I figured that I was safe.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.