From Stack Overflow. A short code fragment to reproduce:
warnings.simplefilter('error', 'Cannot shuffle graph')
degseq = [1,2,2,3]
try:
testgraph = igraph.Graph.Degree_Sequence(degseq,method = "vl")
except RuntimeWarning:
print degseq
else:
print "go on"
This will print:
MemoryError: Error at src/attributes.c:284: not enough memory to allocate attribute hashes, Out of memory
The problem is that the C core of igraph never anticipates that some warnings are turned into errors, therefore it does not bail out from igraph_degree_sequence_game at the point where the warning was raised.