擅长:python、mysql、java
<p>是否要执行此操作:</p>
<pre><code>cur = conn.cursor()
cursor.execute('INSERT INTO tweets (text, date) VALUES (?, NOW())' ,(status.text))
</code></pre>
<p>或者这个:</p>
^{pr2}$
<p>在第一种情况下,<code>cursor</code>未声明。在</p>
<p>而且,正如lqc指出的,你可以让所有的错误保持沉默。不要捕捉任何异常来查看发生了什么,或者将其更改为更具体的内容(如<code>UnicodeError</code>)。在</p>