VISTAS-IVES / pyvistas

VISualization of Terrestrial-Aquatic Systems
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Loading data with old stats files fails #64

Closed nikmolnar closed 7 years ago

nikmolnar commented 7 years ago

Tried to load a VELMA dataset with an existing stats .json file:

Traceback (most recent call last):
  File "/Users/nikmolnar/projects/pyvistas/source/vistas/ui/controllers/app.py", line 117, in OnWindowMenu
    self.main_window.project_controller.AddDataFromFile(None)
  File "/Users/nikmolnar/projects/pyvistas/source/vistas/ui/controllers/project.py", line 258, in AddDataFromFile
    plugin.set_path(path)
  File "/Users/nikmolnar/projects/pyvistas/source/vistas/core/plugins/data.py", line 37, in set_path
    self.load_stats()
  File "/Users/nikmolnar/projects/pyvistas/source/vistas/core/plugins/data.py", line 94, in load_stats
    self.stats = PluginStats.load(self.stats_path, self.path, self.variables)
  File "/Users/nikmolnar/projects/pyvistas/source/vistas/core/stats.py", line 68, in load
    stats = cls({var: VariableStats.from_dict(stored.get(var)) for var in plugin_variables if var in stored})
  File "/Users/nikmolnar/projects/pyvistas/source/vistas/core/stats.py", line 68, in <dictcomp>
    stats = cls({var: VariableStats.from_dict(stored.get(var)) for var in plugin_variables if var in stored})
TypeError: argument of type 'NoneType' is not iterable
TaylorMutch commented 7 years ago

Closed #64.