我如何处理错误,比如心理学2. psycopg2.ProgrammingError: cursor.execute("CREATE TEMP TABLE temp_table122 as b, 'Count' as unit; DROP TABLE temp_table1;") except psycopg2.TABLE temp_table1;")
if cursor
在psycopg2文档中,它引用了一个充满乐趣的属性,以安全地构造strings。然而,我在python 3上的安装(应该是来自PyPI的最新版本)不包含这样的属性:# ImportError: cannot import name'sql'
print(dir(psycopg2)) # no mention of sql, although dir is not complete
help
我正在使用MacOS,并试图将我的web应用程序部署到Heroku上,但它一直无法build wheel for psycopg2。我真的尝试过所有的方法--我发现这篇文章很有用:How to install psycopg2 with "pip" on Python? 但是,即使在尝试了所有方法之后,轮子仍然无法构建。----------------------------------------
ERROR: Failed building wheel for psycopg2\n'&qu