Ticket #314 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

orngNetwork.saveNetwork crkne ce ima povezava utez 0

Reported by: blaz Owned by: miha
Milestone: Future Component: orng_modules
Severity: minor Keywords:
Cc: Blocking:
Blocked By:

Description

Primer:

import orange
import orangeom
import orngNetwork

n = 4
net = orangeom.Network(n, 0)
for i in range(n-1):
    net[i, i+1] = i * 3.0
net[n-1, 0] = 10.

optimized = orngNetwork.NetworkOptimization(net)
optimized.saveNetwork("0.net")

Vrne:

/Users/blaz/Documents/Workspace/orange/orngNetwork.py in saveNetwork(self, fn)
    396             for (i,j) in self.graph.getEdges():
    397                 if len(self.graph[i,j]) > 0:
--> 398                     graphFile.write('% 8d % 8d %d' % (i+1, j+1, int(self.graph[i,j][0])))
    399                     graphFile.write('\n')
    400 

TypeError: int() argument must be a string or a number, not 'NoneType'
WARNING: Failure executing file: <tmp.py>

Change History

comment:1 Changed 6 years ago by miha

popravil sem tudi izpis. namesto int zdaj izpisujem težo kot float

comment:2 Changed 6 years ago by miha

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.