Open markus70 opened 6 years ago
Hey markus, first of all, thanks for using this tool. I wrote this several years ago and I am not actively maintaining it anymore, because I have a lot of stuff on my plate since then. You are welcome to submit a pull request which I would happily merge if it solves your problem.
(The input file looks okay to my eyes, so it probably is a bug)
I can reproduce this issue:
Traceback (most recent call last):
File "/usr/local/bin/shaape", line 4, in <module>
__import__('pkg_resources').run_script('shaape==1.1.1', 'shaape')
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 719, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1511, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/shaape-1.1.1-py2.7.egg/EGG-INFO/scripts/shaape", line 6, in <module>
File "build/bdist.linux-x86_64/egg/shaape/run.py", line 124, in run
File "build/bdist.linux-x86_64/egg/shaape/run.py", line 78, in run
File "build/bdist.linux-x86_64/egg/shaape/overlayparser.py", line 137, in run
File "build/bdist.linux-x86_64/egg/shaape/graphalgorithms.py", line 117, in planar_cycles
File "build/bdist.linux-x86_64/egg/shaape/graphalgorithms.py", line 84, in next_neighbor
File "/usr/local/lib/python2.7/dist-packages/networkx/classes/reportviews.py", line 929, in __getitem__
u, v = e
TypeError: 'int' object is not iterable
python --version
Python 2.7.15rc1
@christiangoltz Python 2.7 is supported right ?
I've added a few print
to understand what's going on:
components
<generator object connected_component_subgraphs at 0x7f4e43ad5640>
component
<class 'networkx.classes.graph.Graph'>
shaape/graphalgorithms.py:84
graph.edges()
[(((5.5, 3.5),miter,True), ((5.5, 3),miter,True)), (((5.5, 3.5),miter,True), ((5, 3.5),miter,True)), (((5.5, 1.5),miter,True), ((5.5, 2),miter,True)), (((5.5, 1.5),miter,True), ((5, 1.5),miter,True)), (((5, 3.5),miter,True), ((5.5, 3.5),miter,False)), (((5, 3.5),miter,True), ((4, 3.5),miter,True)), (((2, 3.5),miter,True), ((3, 3.5),miter,True)), (((2, 3.5),miter,True), ((1.5, 3.5),miter,True)), (((3, 3.5),miter,True), ((2, 3.5),miter,True)), (((3, 3.5),miter,True), ((4, 3.5),miter,True)), (((3, 1.5),miter,True), ((2, 1.5),miter,True)), (((3, 1.5),miter,True), ((4, 1.5),miter,True)), (((5.5, 2),miter,True), ((5.5, 3),miter,True)), (((5.5, 2),miter,True), ((5.5, 1.5),miter,True)), (((2, 1.5),miter,True), ((3, 1.5),miter,True)), (((2, 1.5),miter,True), ((1.5, 1.5),miter,True)), (((1.5, 3.5),miter,True), ((2, 3.5),miter,True)), (((1.5, 3.5),miter,True), ((1.5, 3),miter,True)), (((5, 1.5),miter,True), ((5.5, 1.5),miter,True)), (((5, 1.5),miter,True), ((4, 1.5),miter,True)), (((1.5, 1.5),miter,True), ((2, 1.5),miter,True)), (((1.5, 1.5),miter,True), ((1.5, 2),miter,True)), (((1.5, 3),miter,True), ((1.5, 3.5),miter,True)), (((1.5, 3),miter,True), ((1.5, 2),miter,True)), (((4, 1.5),miter,True), ((3, 1.5),miter,True)), (((4, 1.5),miter,True), ((5, 1.5),miter,True)), (((5.5, 3),miter,True), ((5.5, 3.5),miter,True)), (((5.5, 3),miter,True), ((5.5, 2),miter,True)), (((1.5, 2),miter,True), ((1.5, 3),miter,True)), (((1.5, 2),miter,True), ((1.5, 1.5),miter,True)), (((4, 3.5),miter,True), ((3, 3.5),miter,True)), (((4, 3.5),miter,True), ((5, 3.5),miter,True))]
<class 'networkx.classes.reportviews.OutEdgeView'>
networkx/classes/reportviews.py:929
e
0
<type 'int'>
I can try to fix this issue but I need some guidance as I'm not really familiar with the code. Do you know what the variable e
should look like ?
Maybe something has changed in networkx
?
Thanks :wink:
On Ubuntu 18.04 I get the following error with any input file from the example: