fumitoh / modelx

Use Python like a spreadsheet!
https://modelx.io
GNU Lesser General Public License v3.0
90 stars 20 forks source link

Error when saving opened model #30

Closed alexeybaran closed 3 years ago

alexeybaran commented 4 years ago

I can't save the model, opened from file.

import modelx as mx
m, s = mx.new_model(), mx.new_space()
@mx.defcells
def a():
    return 1
m.save('m.mx')
m2 = mx.open_model('m.mx')
m2.save('m2.mx')
fumitoh commented 4 years ago

Apply this fix https://github.com/fumitoh/modelx/commit/8a5027f893efd3dc7ea60448bb01a92a38fcc2c5