Python - 错误 - 无法将数据写入流 : <open file '<stdout>' , 模式 'w' 在 0x104c8f150>

标签 python django

我正在从 CSV 文件导入数据,在输入 210 行后,它向我返回此错误。我正在从 Django shell (manage.py shell) 中执行此操作

ERROR - failed to write data to stream: <open file '<stdout>', mode 'w' at 0x104c8f150>

最佳答案

这是 IPython 编码的问题,它不是 UTF-8。 export PYTHONIOENCODING=UTF-8 将解决它。

关于Python - 错误 - 无法将数据写入流 : <open file '<stdout>' , 模式 'w' 在 0x104c8f150>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28115375/

相关文章:

javascript - 通过django模板中数据属性的数值切换元素

python - Django/python : loop through a dictionary and add an item to it

python 在 anaconda 中找不到包 h2o

python - 如何测试均匀性

python - 我需要使用 pyinstaller 应用程序打包 MySQL 服务器/客户端吗?

python - 使用自定义格式化程序登录 django

python - ping ~ 100,000 个服务器,多线程还是多处理更好?

Debug=False 中不存在 url 的 Django 500 错误

django - 当 Debug 为 False 时,如何从 Django 打印 sql 查询

javascript - Django + Javascript - 我们如何验证执行 Javascript 的 Django 值不为空?