PyMetric issueshttps://scm.uninett.no/verktoy/PyMetric/-/issues2019-02-14T12:42:14+01:00https://scm.uninett.no/verktoy/PyMetric/-/issues/6Traceback with isolated node or one-way link in pajek schema2019-02-14T12:42:14+01:00Morten KnutsenTraceback with isolated node or one-way link in pajek schema*Created by: runborg*
When loading a config with a isolated nodes (or one way link to a isolated node) a traceback is generated and pymetric fails.
```
--> $ python metrics.py ../../drift.uninett.no/htdocs/nett/ip-nett/isis-uninett.ne...*Created by: runborg*
When loading a config with a isolated nodes (or one way link to a isolated node) a traceback is generated and pymetric fails.
```
--> $ python metrics.py ../../drift.uninett.no/htdocs/nett/ip-nett/isis-uninett.net
Initializing model....
Traceback (most recent call last):
File "metrics.py", line 42, in <module>
cli = MetricShell(filename=infile)
File "/Users/runarb/src/metric/pymetric/command.py", line 47, in __init__
self.model.refresh_from_file(self.filename)
File "/Users/runarb/src/metric/pymetric/model.py", line 605, in refresh_from_file
self._refresh_all_paths()
File "/Users/runarb/src/metric/pymetric/model.py", line 627, in _refresh_all_paths
self.nodes_and_paths_using_edge(edge[0], edge[1], self.G)
File "/Users/runarb/src/metric/pymetric/model.py", line 102, in nodes_and_paths_using_edge
for path in paths[1]:
TypeError: 'NoneType' object is not iterable
```https://scm.uninett.no/verktoy/PyMetric/-/issues/7One-way-link between two nodes in pajek rases keyError on load2019-02-14T14:53:02+01:00Morten KnutsenOne-way-link between two nodes in pajek rases keyError on load*Created by: runborg*
When loading a pajek with a one-way link networkx failes computation with a keyError
```
Traceback (most recent call last):
File "metrics.py", line 45, in <module>
cli.cmdloop()
File "/Users/runarb/src...*Created by: runborg*
When loading a pajek with a one-way link networkx failes computation with a keyError
```
Traceback (most recent call last):
File "metrics.py", line 45, in <module>
cli.cmdloop()
File "/Users/runarb/src/metric/pymetric/command.py", line 64, in cmdloop
Cmd.cmdloop(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/Users/runarb/src/metric/pymetric/command.py", line 424, in do_plot
self.gui.plot(G, graphdata, edge_cmap=cmap, edge_capa=capa)
File "/Users/runarb/src/metric/pymetric/plotting.py", line 292, in plot
pos=data['pos'])
File "/Users/runarb/src/metric/pymetric/plotting.py", line 350, in _plot_edge_labels
if d < 70 and G[v][u]['weight'] == w['weight']:
File "/Library/Python/2.7/site-packages/networkx/classes/coreviews.py", line 54, in __getitem__
return self._atlas[key]
KeyError: 'ifi2-gw4'
```https://scm.uninett.no/verktoy/PyMetric/-/issues/14"Special" links speeds are not supported.2019-12-03T14:40:03+01:00Morten Knutsen"Special" links speeds are not supported.*Created by: runborg*
Link speeds other than some special speeds are not supported. eg. 2,2.5,5,20,25,40gbit++ is not supported in the current implementation and failes with this error:
```
(sim) >>> plot with-load
Traceback (most r...*Created by: runborg*
Link speeds other than some special speeds are not supported. eg. 2,2.5,5,20,25,40gbit++ is not supported in the current implementation and failes with this error:
```
(sim) >>> plot with-load
Traceback (most recent call last):
File "/home/he/Desktop/pymetric/metrics.py", line 45, in <module>
cli.cmdloop()
File "/home/he/Desktop/pymetric/command.py", line 64, in cmdloop
Cmd.cmdloop(self)
File "/usr/pkg/lib/python2.7/cmd.py", line 142, in cmdloop
stop = self.onecmd(line)
File "/usr/pkg/lib/python2.7/cmd.py", line 221, in onecmd
return func(arg)
File "/home/he/Desktop/pymetric/command.py", line 424, in do_plot
self.gui.plot(G, graphdata, edge_cmap=cmap, edge_capa=capa)
File "/home/he/Desktop/pymetric/plotting.py", line 248, in plot
for i in range(len(edges))]
KeyError: 40000000
```
This comes by the line-width array be'ing a static mapping and not allows for dynamic scaling.
se: https://github.com/Uninett/PyMetric/blob/b32bdde81308fdb0baf28c3a194ee58a1d2bd1ee/plotting.py#L53
New speeds needs to be added as a short fix, and as a permanent fix this scaling needs to be done dynamically to allow for whatever speed is available