d-michail / python-jgrapht Goto Github PK
View Code? Open in Web Editor NEWThe Python-JGraphT library
License: Eclipse Public License 2.0
The Python-JGraphT library
License: Eclipse Public License 2.0
Here have some info
`
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
...
Graph.drawing.draw_matplotlib.draw_jgrapht(G)
File "F:\python36\lib\site-packages\jgrapht\drawing\draw_matplotlib.py", line 119, in draw_jgrapht
positions = layout(g, name=kwargs.get('name'))
File "F:\python36\lib\site-packages\jgrapht\drawing\draw_matplotlib.py", line 770, in layout
x, y = result.get_vertex_location(i)
File "F:\python36\lib\site-packages\jgrapht_internals_anyhashableg_drawing.py", line 18, in get_vertex_location
vertex = _vertex_anyhashableg_to_g(self._graph, vertex)
File "F:\python36\lib\site-packages\jgrapht_internals_anyhashableg.py", line 797, in _vertex_anyhashableg_to_g
return graph._vertex_hash_to_id[vertex] if vertex is not None else None
KeyError: 0
`
The Graph vertex is a new class. it can work, but can't drawing.
Since positions are extracted using vertex indices and not values, masked subgraphs are not drawn correctly. This is fixed in pull request #12.
I'm trying to import an edgelist file with no success.
My input file is a single edge; the file is:
0, 1
My code is as follows (<input file> substitutes for the file path):
import jgrapht as j
input_file = <input file>
e = j.io.edgelist.parse_edgelist_csv(input_file, format='edgelist')
I get the following error:
Traceback (most recent call last):
File "<python file>", line 12, in <module>
e = j.io.edgelist.parse_edgelist_csv(input_file, format='edgelist')
File "<....>/jgrapht/io/edgelist.py", line 532 in parse_edgelist_csv
return _import_edgelist_with_string_ids("string_csv", False, input_string, *args)
File "<....>/jgrapht/io/edgelist.py", line 23 in _import_edgelist_with_string_ids
res = alg_method(filename_or_string_as_bytearray, *args)
File "<....>/jgrapht/backend.py", line 780, in jgrapht_import_edgelist_noattrs_string_csv
return _backend_jgrapht_import_edgelist_noattrs_string_csv(BYTEARRAY, arg2, arg3, arg4, arg5)
', 'ror: Failed to import CSV graph: line 1:38 mismatched innput '<EOF>' expecting {'
', SEPARATOR}
I'm running this in a conda environment, Python 3.8, with no other installed packages than those installed when installing jgrapht, on an Ubuntu VM.
I am trying to create an empty graph using jgrapth (latest) inside a job from apscheduler library (version 3.6.3), but I am having a java exception everytime the job is executed:
Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred. traveltimeservice | traveltimeservice | JavaFrameAnchor dump: traveltimeservice | traveltimeservice | No anchors traveltimeservice | traveltimeservice | TopFrame info: traveltimeservice | traveltimeservice | TotalFrameSize in CodeInfoTable 32 traveltimeservice | traveltimeservice | VMThreads info: traveltimeservice | traveltimeservice | VMThread 0000000001484120 STATUS_IN_JAVA (safepoints disabled) java.lang.Thread@0x7f12e939fd78 traveltimeservice | traveltimeservice | VM Thread State for current thread 0000000001484120: traveltimeservice | traveltimeservice | 0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes) traveltimeservice | 0000000001484120: 00007f12e9036d68 traveltimeservice | traveltimeservice | 8 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes) traveltimeservice | 0000000001484128: 00007f12e7900000 00007f12e7a00000 traveltimeservice | 0000000001484138: 00007f12e79021e8 0000000000000000 traveltimeservice | traveltimeservice | traveltimeservice | 40 (8 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null traveltimeservice | 48 (8 bytes): com.oracle.svm.core.jdk.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) null traveltimeservice | 56 (8 bytes): com.oracle.svm.core.snippets.ExceptionUnwind.currentException = (Object) null traveltimeservice | 64 (8 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread 00007f12e939fd78 traveltimeservice | 72 (8 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null traveltimeservice | 80 (8 bytes): com.oracle.svm.jni.JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles 00007f12e7901228 traveltimeservice | 88 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPendingException.pendingException = (Object) null traveltimeservice | 96 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null traveltimeservice | 104 (8 bytes): com.oracle.svm.jni.JNIThreadOwnedMonitors.ownedMonitors = (Object) null traveltimeservice | 112 (8 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.freeList = (Word) 0 0000000000000000 traveltimeservice | 120 (8 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.stackBoundaryTL = (Word) 1 0000000000000001 traveltimeservice | 128 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0 0000000000000000 traveltimeservice | 136 (8 bytes): com.oracle.svm.core.thread.VMThreads.IsolateTL = (Word) 139719186989056 00007f12e8824000 traveltimeservice | 144 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadHandleTL = (Word) 139719241832256 00007f12ebc71740 traveltimeservice | 152 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 139719241832256 00007f12ebc71740 traveltimeservice | 160 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 0 0000000000000000 traveltimeservice | 168 (4 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.yellowZoneStateTL = (int) -16843010 fefefefe traveltimeservice | 172 (4 bytes): com.oracle.svm.core.snippets.ImplicitExceptions.implicitExceptionsAreFatal = (int) 0 00000000 traveltimeservice | 176 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) 2147473738 7fffd94a traveltimeservice | 180 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0 00000000 traveltimeservice | 184 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnTransitionToJavaSupport.actionTL = (int) 0 00000000 traveltimeservice | 188 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1 00000001 traveltimeservice | 192 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1 00000001 traveltimeservice | traveltimeservice | VMOperation dump: traveltimeservice | traveltimeservice | No VMOperation in progress traveltimeservice | traveltimeservice | Dump Counters: traveltimeservice | traveltimeservice | traveltimeservice | Raw Stacktrace: traveltimeservice | traveltimeservice | 00007f12ded59dc0: 0000000001278288 00007f12e8f3fae8 traveltimeservice | 00007f12ded59dd0: 00007f12e8824000 00007f12e7b64906 traveltimeservice | 00007f12ded59de0: 0000000001286fa8 000000000059b0a2 traveltimeservice | 00007f12ded59df0: 0000000100000007 00007f12e7b64c6a traveltimeservice | 00007f12ded59e00: 0000000000000027 00007f12d40009f8 traveltimeservice | 00007f12ded59e10: 00007f12e93f5fa0 0000000100000290 traveltimeservice | 00007f12ded59e20: ffffffffffffffff ffffffffffffffff traveltimeservice | 00007f12ded59e30: ffffffffffffffff ffffffffffffffff traveltimeservice | 00007f12ded59e40: ffffffffffffffff ffffffffffffffff traveltimeservice | 00007f12ded59e50: 0000000000000098 0000000000000bfc traveltimeservice | 00007f12ded59e60: ffffffffffffffff ffffffffffffffff traveltimeservice | 00007f12ded59e70: 0000000000000000 0000000000000000 traveltimeservice | 00007f12ded59e80: 0000000000000000 0000000000000000 traveltimeservice | 00007f12ded59e90: 2f6465792f6c6d78 733a697378202233 traveltimeservice | 00007f12ded59ea0: 72672f2f3a707474 72672e6c6d687061 traveltimeservice | 00007f12ded59eb0: 74746820736e6c6d 2e7777772f2f3a70 traveltimeservice | 00007f12ded59ec0: 72672f616d656863 2e312f6c6d687061 traveltimeservice | 00007f12ded59ed0: 6c6d68706172673c 223d736e6c6d7820 traveltimeservice | 00007f12ded59ee0: 646920656764653c 326e3a3a326e223d traveltimeservice | 00007f12ded59ef0: 6e3a3a326e3a3a32 6567726174202237 traveltimeservice | 00007f12ded59f00: 00000000008a3850 00007f12ded90108 traveltimeservice | 00007f12ded59f10: 0000000000000000 0000000000000000 traveltimeservice | 00007f12ded59f20: 0000000000000001 00000000ffffffff traveltimeservice | 00007f12ded59f30: 0000000000000001 0000000000000001 traveltimeservice | 00007f12ded59f40: 00007f12ded5a028 0000000000000001 traveltimeservice | 00007f12ded59f50: 00007ffe18c2b000 0000000000000001 traveltimeservice | 00007f12ded59f60: 0000000080000001 00007f12ded5a028 traveltimeservice | 00007f12ded59f70: 0000000000000001 0000000000000001 traveltimeservice | 00007f12ded59f80: 00007f12ded59f90 00007f12e8565b33 traveltimeservice | 00007f12ded59f90: 00007f12e9a37120 0000000000000077 traveltimeservice | 00007f12ded59fa0: 00007f12ded5a028 00007f12e7b2cca6 traveltimeservice | 00007f12ded59fb0: 00007f12eb8b93a8 00007f12e9a05810 traveltimeservice | 00007f12ded59fc0: 00000000008183a0 00007f12ded5a028 traveltimeservice | 00007f12ded59fd0: 0000000100000001 0000000100000001 traveltimeservice | 00007f12ded59fe0: 0000000001484120 0000000080000001 traveltimeservice | 00007f12ded59ff0: 0000000000000001 0000000000000001 traveltimeservice | 00007f12ded5a000: 0000000000000001 00000000ffffffff traveltimeservice | 00007f12ded5a010: 00007f12ded5a028 00007f12e97d062e traveltimeservice | 00007f12ded5a020: 0000000000000008 0000000000000001 traveltimeservice | 00007f12ded5a030: 000000000081f0c0 000000000081f0c0 traveltimeservice | 00007f12ded5a040: 000000000081f0c0 000000000081f0c0 traveltimeservice | 00007f12ded5a050: 00007f12eba7f048 00007f12e02deb38 traveltimeservice | 00007f12ded5a060: 0000000000000000 00007f12e9a35778 traveltimeservice | 00007f12ded5a070: 0000000001bf9fb0 00007f12e97d0540 traveltimeservice | 00007f12ded5a080: 0000000000000000 00000000005ccc42 traveltimeservice | 00007f12ded5a090: 00007f12ded5a1b8 0000000000000004 traveltimeservice | 00007f12ded5a0a0: 00007f1200000001 0000000000000000 traveltimeservice | 00007f12ded5a0b0: 00007f12e9a809d8 00007f12ded5a1c0 traveltimeservice | 00007f12ded5a0c0: 00007f12e9a37120 0000000001bf9fa8 traveltimeservice | 00007f12ded5a0d0: 0000000001bf9fb0 0000000000000004 traveltimeservice | 00007f12ded5a0e0: 00007f12d00016c0 000000000053ecf0 traveltimeservice | 00007f12ded5a0f0: 0000000000000000 00007f12e9a35778 traveltimeservice | 00007f12ded5a100: 000000000081ec40 0000000000000004 traveltimeservice | 00007f12ded5a110: 00007f12e9a1344e 0000000001bf9fd0 traveltimeservice | 00007f12ded5a120: 0000000001bf9e18 0000000000542228 traveltimeservice | 00007f12ded5a130: 00000000000000a1 000000000054653a traveltimeservice | 00007f12ded5a140: 0000000000000000 0000000000000000 traveltimeservice | 00007f12ded5a150: 00007f12e9a13440 00007f12d00016c0 traveltimeservice | 00007f12ded5a160: 0000000001bf9f80 00007f12e9a12508 traveltimeservice | 00007f12ded5a170: 00007f12e9a13470 ffffffff00000000 traveltimeservice | 00007f12ded5a180: 00007f12e9a11a50 0000000001bf9fa0 traveltimeservice | 00007f12ded5a190: 00007f12ded5a240 00007f12e9a05810 traveltimeservice | 00007f12ded5a1a0: 00000000008183a0 00000000ffffffff traveltimeservice | 00007f12ded5a1b0: 00007f12e9a809d8 00007f12e9a37120 (1 liked)โ[12:30 PM] Macias, Alan Full Stacktrace: traveltimeservice | traveltimeservice | RSP 00007f12ded59dc0 RIP 00007f12e7b97256 [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:111) traveltimeservice | RSP 00007f12ded59dc0 RIP 00007f12e7b97256 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:74) traveltimeservice | RSP 00007f12ded59de0 RIP 00007f12e7b64906 [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:59) traveltimeservice | RSP 00007f12ded59de0 RIP 00007f12e7b64906 [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.makeYellowZoneAvailable(StackOverflowCheckImpl.java:157) traveltimeservice | RSP 00007f12ded59e00 RIP 00007f12e7b64c6a [image code] com.oracle.svm.core.graal.snippets.StackOverflowCheckSnippets.throwNewStackOverflowError(StackOverflowCheckImpl.java:347) traveltimeservice | RSP 00007f12ded59f90 RIP 00007f12e8565b33 [image code] org.jgrapht.capi.impl.GraphApi.createGraph(GraphApi.java:98) traveltimeservice | RSP 00007f12ded59fb0 RIP 00007f12e7b2cca6 [image code] com.oracle.svm.core.code.IsolateEnterStub.GraphApi_createGraph_55db92e5a9752f432b95dce58782e288322437ad(IsolateEnterStub.java:0) traveltimeservice | traveltimeservice | [Native image heap boundaries: traveltimeservice | ReadOnly Primitives: 0x7f12e8824008 .. 0x7f12e8da2518 traveltimeservice | ReadOnly References: 0x7f12e8da2f58 .. 0x7f12e9096e40 traveltimeservice | Writable Primitives: 0x7f12e9097000 .. 0x7f12e91fa858 traveltimeservice | Writable References: 0x7f12e91fa870 .. 0x7f12e9596ef0] traveltimeservice | traveltimeservice | traveltimeservice | [Heap: traveltimeservice | [Young generation: traveltimeservice | [youngSpace: traveltimeservice | aligned: 0/0 unaligned: 0/0]] traveltimeservice | [Old generation: traveltimeservice | [fromSpace: traveltimeservice | aligned: 0/0 unaligned: 0/0] traveltimeservice | [toSpace: traveltimeservice | aligned: 0/0 unaligned: 0/0] traveltimeservice | ] traveltimeservice | [Unused: traveltimeservice | aligned: 0/0]] traveltimeservice | traveltimeservice | Fatal error: StackOverflowError: Enabling the yellow zone of the stack did not make any stack space available. Possible reasons for that: 1) A call from native code to Java code provided the wrong JNI environment or the wrong IsolateThread; 2) Frames of native code filled the stack, and now there is not even enough stack space left to throw a regular StackOverflowError; 3) An internal VM error occurred.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.