【发布时间】:2012-02-05 11:38:17
【问题描述】:
昨天我从 Windows 7 切换到 Linux Mint 12。到目前为止一切都很好,除了 Django 和 PostgreSQL 的一些问题。
我运行一些代码来读取文件并将信息写入数据库。在 Windows 上它运行平稳,没有任何异常,然而,在 Linux 上我经常得到这个:
django.db.utils.DatabaseError: current transaction is aborted, commands ignored until end of transaction block
以及日志的结尾:http://pastebin.com/Uf1Jb3fe
脚本通过终端调用,导入 django 设置,然后使用 ORM,但我认为情况并非如此,因为在 Windows 中一切都很好。
那么,我该怎么办?顺便说一下,由于我还是Linux新手,请尝试以非常详细的方式解释解决方案。
【问题讨论】:
-
我开始使用 MySQL,它很好,但为什么 PgSQL 会引发这些异常?
标签: django linux postgresql