<div class="gmail_quote">On Mon, Nov 23, 2009 at 10:08 AM, Carsten Haese <span dir="ltr"><<a href="mailto:carsten.haese@gmail.com">carsten.haese@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As I said, the best way we can help you is if you copy the actual error<br>
message so that we may diagnose the actual problem and suggest a<br>
solution that fixes the problem.<br></blockquote><div><br></div></div>That gave me the idea that I should simply open two separate connections. Here's the error that got thrown with the second connection:<br><p>A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td bgcolor="#d8bbff"><big> </big><a href="file:///var/www/html/angrynates.com/cart/createProducts2.py">/var/www/html/angrynates.com/cart/createProducts2.py</a> </td></tr>
<tr><td><font color="#909090"><tt><small>  117</small> </body><br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  118</small> </html><br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  119</small> '''<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  120</small> <br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>  121</small> createProducts2()<br>
</tt></td></tr>
<tr><td><small><font color="#909090"><strong>createProducts2</strong> = <function createProducts2></font></small></td></tr></tbody></table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td bgcolor="#d8bbff"><big> </big><a href="file:///var/www/html/angrynates.com/cart/createProducts2.py">/var/www/html/angrynates.com/cart/createProducts2.py</a> in <strong>createProducts2</strong>()</td></tr>
<tr><td><font color="#909090"><tt><small>   35</small>       sst.append(bits[2])<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   36</small>       sstp.append(bits[1])<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>   37</small>   db2 = MySQLdb.connect(host, user, passwd, db)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>   38</small>   cursor2 = db.cursor()<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   39</small>   created = []<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090">db2 <em>undefined</em>, <em>global</em> <strong>MySQLdb</strong> = <module 'MySQLdb' from '/usr/lib64/python2.4/site-packages/MySQLdb/__init__.pyc'>, MySQLdb.<strong>connect</strong> = <function Connect>, <strong>host</strong> = 'localhost', <strong>user</strong> = 'beno', <strong>passwd</strong> = 'Kj9rg2', <strong>db</strong> = <_mysql.connection open to 'localhost' at 28772c0></font></small></td>
</tr></tbody></table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib64/python2.4/site-packages/MySQLdb/__init__.py">/usr/lib64/python2.4/site-packages/MySQLdb/__init__.py</a> in <strong>Connect</strong>(*args=('localhost', 'beno', 'Kj9rg2', <_mysql.connection open to 'localhost' at 28772c0>), **kwargs={})</td>
</tr>
<tr><td><font color="#909090"><tt><small>   73</small>     """Factory function for connections.Connection."""<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   74</small>     from connections import Connection<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>   75</small>     return Connection(*args, **kwargs)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>   76</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   77</small> connect = Connection = Connect<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>Connection</strong> = <class 'MySQLdb.connections.Connection'>, <strong>args</strong> = ('localhost', 'beno', 'Kj9rg2', <_mysql.connection open to 'localhost' at 28772c0>), <strong>kwargs</strong> = {}</font></small></td>
</tr></tbody></table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib64/python2.4/site-packages/MySQLdb/connections.py">/usr/lib64/python2.4/site-packages/MySQLdb/connections.py</a> in <strong>__init__</strong>(self=<_mysql.connection
closed at 28d95c0>, *args=('localhost', 'beno', 'Kj9rg2',
<_mysql.connection open to 'localhost' at 28772c0>), **kwargs={})</td></tr>
<tr><td><font color="#909090"><tt><small>  162</small>         kwargs2['client_flag'] = client_flag<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  163</small> <br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>  164</small>         super(Connection, self).__init__(*args, **kwargs2)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>  165</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  166</small>         self.encoders = dict([ (k, v) for k, v in conv.items()<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>builtin</em> <strong>super</strong> = <type 'super'>, <em>global</em> <strong>Connection</strong> = <class 'MySQLdb.connections.Connection'>, <strong>self</strong> = <_mysql.connection closed at 28d95c0>, ).<strong>__init__</strong> = <bound method Connection.__init__ of <_mysql.connection closed at 28d95c0>>, <strong>args</strong> = ('localhost', 'beno', 'Kj9rg2', <_mysql.connection open to 'localhost' at 28772c0>), <strong>kwargs2</strong> =
{'client_flag': 196608, 'conv': {0: <class 'decimal.Decimal'>, 1:
<type 'int'>, 2: <type 'int'>, 3: <type 'long'>, 4:
<type 'float'>, 5: <type 'float'>, 7: <function
mysql_timestamp_converter>, 8: <type 'long'>, 9: <type
'int'>, 10: <function Date_or_None>, ...}}</font></small></td></tr></tbody></table><strong>TypeError</strong>: connect() argument 4 must be string, not Connection
<br><tt><small>     </small> </tt>args =
('connect() argument 4 must be string, not Connection',)<br><br>TIA,<br>V<br>