当我在一个小的测试图上运行代码时,我的代码可以工作,但是当我给它一个更大的文件时,我的代码无法读取它,并返回错误代码-1073741571。有谁知道是什么原因造成的?
我已经搜索了互联网,找不到与代码-1073741571相关的任何引用
def load_graph():
graphfwd = []
graphrev = []
explored = []
h = 0
with open('SCC.txt', 'r') as graphInput:
lines = graphInput.readlines()
maxime = 0
for line in lines:
ints = [int(x) for x in line.split()]
for i in ints:
if i > maxime:
maxime = i
graphfwd = [[] for x in range(maxime + 1)]
graphrev = [[] for x in range(maxime + 1)]
for line in lines:
ints = [int(x) for x in line.split()]
graphfwd[ints[0]].append(ints[1])
graphrev[ints[1]].append(ints[0])
return graphfwd, graphrev, maxime