我是靠谱客的博主 无奈世界,这篇文章主要介绍csv.field_size_limit(sys.maxsize) OverflowError: Python int too large to convert to C long,现在分享给大家,希望可以做个参考。

在运行torchtext.data.TabularDataset()时报错:csv.field_size_limit(sys.maxsize) OverflowError: Python int too large to convert to C long

在你电脑的某位置下的python3.XLibsite-packagestorchtextutils.py脚本里将

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
maxInt = sys.maxsize while True: # decrease the maxInt value by factor 10 # as long as the OverflowError occurs. try: csv.field_size_limit(maxInt) break except OverflowError: maxInt = int(maxInt / 10) csv.field_size_limit(sys.maxsize)

里面的csv.field_size_limit(sys.maxsize)注释掉,添加csv.field_size_limit(maxInt)即可

最后

以上就是无奈世界最近收集整理的关于csv.field_size_limit(sys.maxsize) OverflowError: Python int too large to convert to C long的全部内容,更多相关csv.field_size_limit(sys.maxsize)内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(134)

评论列表共有 0 条评论

立即
投稿
返回
顶部