P4DTI with Bugzilla 3.4 - 'unicode' is an invalid keyword argument for this function

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

P4DTI with Bugzilla 3.4 - 'unicode' is an invalid keyword argument for this function

Blaskowitz
Hi,

I'm attempting to integrate P4DTI with bugzilla 3.4. However, when starting the service (i.e. running run.py) I'm receiving this error:

# service p4dti start
Starting p4dti:
Traceback (most recent call last):
  File "run.py", line 20, in ?
    from init import r
  File "init.py", line 135, in ?
    config = configure_module.configuration(config)
  File "configure_bugzilla.py", line 574, in configuration
    db = mysqldb_support.connect(config)
  File "mysqldb_support.py", line 314, in connect
    return apply(MySQLdb.connect, [], connect_args)
  File "/usr/lib/python2.2/site-packages/MySQLdb/__init__.py", line 63, in Connect
    return apply(Connection, args, kwargs)
  File "/usr/lib/python2.2/site-packages/MySQLdb/connections.py", line 58, in __init__
    self._db = apply(connect, args, kwargs2)
TypeError: 'unicode' is an invalid keyword argument for this function

I'm not too knowledgeable in Python, however this looks like some kind of casting issue. The kwargs being passed to the function are defined in mysqldb_support.py as:

     connect_args = {
        'host': config.dbms_host,
        'port': config.dbms_port,
        'db': config.dbms_database,
        'user': config.dbms_user,
        'passwd': config.dbms_password,
        }
    assert args
    connect_args.update(args(release))
    return apply(MySQLdb.connect, [], connect_args)

The snippet of the line it's failing on is:

def __init__(self, *args, **kwargs):
<snip>
     self._db = apply(connect, args, kwargs2)

I've tried wrapping the above string in a str() function to type as an str instead of unicode, without luck.

Mysql version:

# mysql -V
mysql  Ver 14.7 Distrib 4.1.22, for pc-linux-gnu (i686) using readline 4.3

Redhat version etc:

# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 3 (Taroon Update 4)
# uname -a
Linux 2.4.21-27.0.4.EL Wed Aug 17 12:18:30 CDT 2005 i686 i686 i386 GNU/Linux

Does anyone have any leads on this, or perhaps otherwise been able to get Bugzilla 3.4 working with Perforce?

Thanks