0

When I run my code on a small test graph my code works but when I give it a bigger file my code fails to read it and returns the error code -1073741571. Does anyone know what causes this?

I have searched the internet and cannot find any reference to the code -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

0 Answers0