<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MySQLdb and executemany error &#8220;incomplete format&#8221;</title>
	<atom:link href="http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/feed" rel="self" type="application/rss+xml" />
	<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format</link>
	<description>picayune: of little value or importance</description>
	<lastBuildDate>Mon, 31 May 2010 21:40:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: ScW</title>
		<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/comment-page-1#comment-20913</link>
		<dc:creator>ScW</dc:creator>
		<pubDate>Tue, 03 Jun 2008 08:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format#comment-20913</guid>
		<description>updated the post with the &quot;quick and dirty&quot; fix presented on the sourceforge site.</description>
		<content:encoded><![CDATA[<p>updated the post with the &#8220;quick and dirty&#8221; fix presented on the sourceforge site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek</title>
		<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/comment-page-1#comment-20899</link>
		<dc:creator>Derek</dc:creator>
		<pubDate>Mon, 02 Jun 2008 21:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format#comment-20899</guid>
		<description>Just confirming, we are seeing the same thing here, six months after this was posted.  Was this ever reported as a bug?  What is the current status?</description>
		<content:encoded><![CDATA[<p>Just confirming, we are seeing the same thing here, six months after this was posted.  Was this ever reported as a bug?  What is the current status?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raph</title>
		<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/comment-page-1#comment-20184</link>
		<dc:creator>Raph</dc:creator>
		<pubDate>Fri, 11 Apr 2008 16:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format#comment-20184</guid>
		<description>Hi there,

Yep, same problem with me here...

Did you report it as a bug already?

Can&#039;t see what we are doing wrong, and I did spend quite a lot of time on this issue...</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>Yep, same problem with me here&#8230;</p>
<p>Did you report it as a bug already?</p>
<p>Can&#8217;t see what we are doing wrong, and I did spend quite a lot of time on this issue&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin</title>
		<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/comment-page-1#comment-17397</link>
		<dc:creator>Marcin</dc:creator>
		<pubDate>Mon, 10 Mar 2008 04:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format#comment-17397</guid>
		<description>Hey ScW, just wondering if you found a way around this problem. I&#039;m experiencing the same issue.

results = [{&#039;test1&#039;:&#039;test value 1&#039;,&#039;test2&#039;:&#039;test value 2&#039;}{&#039;test3&#039;:&#039;test value 3&#039;,&#039;test4&#039;:&#039;test value 4&#039;}]
c.executemany(sqlStringItems,results)

Traceback (most recent call last):
  File &quot;&quot;, line 1, in 
  File &quot;/var/lib/python-support/python2.5/MySQLdb/cursors.py&quot;, line 217, in executemany
    self.errorhandler(self, exc, value)
  File &quot;/var/lib/python-support/python2.5/MySQLdb/connections.py&quot;, line 35, in defaulterrorhandler
    raise errorclass, errorvalue
ValueError: incomplete format</description>
		<content:encoded><![CDATA[<p>Hey ScW, just wondering if you found a way around this problem. I&#8217;m experiencing the same issue.</p>
<p>results = [{'test1':'test value 1','test2':'test value 2'}{'test3':'test value 3','test4':'test value 4'}]<br />
c.executemany(sqlStringItems,results)</p>
<p>Traceback (most recent call last):<br />
  File &#8220;&#8221;, line 1, in<br />
  File &#8220;/var/lib/python-support/python2.5/MySQLdb/cursors.py&#8221;, line 217, in executemany<br />
    self.errorhandler(self, exc, value)<br />
  File &#8220;/var/lib/python-support/python2.5/MySQLdb/connections.py&#8221;, line 35, in defaulterrorhandler<br />
    raise errorclass, errorvalue<br />
ValueError: incomplete format</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ScW</title>
		<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/comment-page-1#comment-4236</link>
		<dc:creator>ScW</dc:creator>
		<pubDate>Sat, 19 Jan 2008 22:14:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format#comment-4236</guid>
		<description>garyl, your suggestion would defeat the purpose of using a dict (i.e. a map) for supplying values. While my example is trivial (2 fields)... how about if you had 10 or 20 values to insert?</description>
		<content:encoded><![CDATA[<p>garyl, your suggestion would defeat the purpose of using a dict (i.e. a map) for supplying values. While my example is trivial (2 fields)&#8230; how about if you had 10 or 20 values to insert?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: garyl</title>
		<link>http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format/comment-page-1#comment-3874</link>
		<dc:creator>garyl</dc:creator>
		<pubDate>Fri, 18 Jan 2008 01:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.devpicayune.com/entry/mysqldb-and-executemany-error-incomplete-format#comment-3874</guid>
		<description>sqlStringItems = &quot;&quot;&quot;INSERT INTO test_table
                    (test_col_1,test_col_2)
                    VALUES
                    (%s, %s);&quot;&quot;&quot;

#and use tuples 
args=[(&#039;testcol1 data1&#039;,&#039;testcol2 data1),(&#039;testcol1 data2&#039;,&#039;testcol2 data2)]
res=cur.executemany(sqlStringItems,args)
#this should work for you  if not replace the args list of tuples with a tuple of tuples</description>
		<content:encoded><![CDATA[<p>sqlStringItems = &#8220;&#8221;"INSERT INTO test_table<br />
                    (test_col_1,test_col_2)<br />
                    VALUES<br />
                    (%s, %s);&#8221;"&#8221;</p>
<p>#and use tuples<br />
args=[('testcol1 data1','testcol2 data1),('testcol1 data2','testcol2 data2)]<br />
res=cur.executemany(sqlStringItems,args)<br />
#this should work for you  if not replace the args list of tuples with a tuple of tuples</p>
]]></content:encoded>
	</item>
</channel>
</rss>
