文件太大python [英] File too Large python

查看:161
本文介绍了文件太大python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用python写入一个文件。脚本突然停止运行,并抛出一个'IOError:[Errno 27]文件太大'
您可以使用程序创建的文件大小是否有限制?
有没有其他人面对这个问题?
停止时,文件大小接近4.3Gb(有点大)。 Python 错误报告表示操作系统是此错误消息的来源,而不是Python。



由于您正在写入FAT分区,并且最大文件大小FAT 32的限制是4GB( LinuxFilesystemsExplained ),这很可能是您的问题的原因。使用不同的文件系统在系统或分区上运行你的程序会告诉你。


I am writing to a file using python. The script suddenly stops running and throws an 'IOError: [Errno 27] File too large' Is there a limit on the size of the file that you are allowed to create using a program? Has anyone else faced this issue? The file size was close to 4.3Gb(it is a bit big) when it stopped.

解决方案

This Python bug report indicates that the OS is the source of this error message, not Python.

Since you are writing to a FAT partition, and the maximum file size limit is 4GB for FAT 32 (LinuxFilesystemsExplained) this is most likely the cause of your problem. Running your program on a system or partition with a different file system would tell you for sure.

这篇关于文件太大python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆