Castronova / EMIT

Environmental Model Integration Project (EMIT)
GNU General Public License v2.0
0 stars 2 forks source link

Plot context menu does not work #350

Open farrieta9 opened 8 years ago

farrieta9 commented 8 years ago

Right click->plot in context menu should behave the same as double clicking.

Also consider changing the name plot to something like View for example. The reason for the change is clicking on plot does not plot it, but bring up the view controller.

Castronova commented 8 years ago

@farrieta9 Plotting on the simulations tab does not work at all.

farrieta9 commented 8 years ago

Are you on branch 0.1.6? What error are you getting?

Castronova commented 8 years ago

Right click -> view

No handlers could be found for logger "sqlalchemy.pool.NullPool"
Traceback (most recent call last):
  File "/Users/tonycastronova/code/EMIT/gui/views/ContextView.py", line 531, in on_view
    sub[2].UnitObj.UnitsAbbreviation,
AttributeError: 'Results' object has no attribute 'UnitObj'
farrieta9 commented 8 years ago

Try again, are you still getting this error?

Castronova commented 8 years ago
Traceback (most recent call last):
  File "/Users/tonycastronova/code/EMIT/gui/controller/DatabaseCtrl.py", line 71, in onDoubleClick
    self.Parent.open_simulation_viewer(obj.GetObjectAt(id))
  File "/Users/tonycastronova/code/EMIT/gui/views/LowerPanelView.py", line 530, in open_simulation_viewer
    sub[2].UnitObj.UnitsAbbreviation,
AttributeError: 'Results' object has no attribute 'UnitObj'
Castronova commented 8 years ago

double click produces:

Traceback (most recent call last):
  File "/Users/tonycastronova/code/EMIT/gui/controller/DatabaseCtrl.py", line 71, in onDoubleClick
    self.Parent.open_simulation_viewer(obj.GetObjectAt(id))
  File "/Users/tonycastronova/code/EMIT/gui/views/LowerPanelView.py", line 530, in open_simulation_viewer
    sub[2].UnitObj.UnitsAbbreviation,
AttributeError: 'Results' object has no attribute 'UnitObj'
Castronova commented 8 years ago

right click -> view. No window appears.

farrieta9 commented 8 years ago

This is happening because we are transferring to the new odm api.

Castronova commented 8 years ago

@farrieta9 please be more specific so that we don't forget what is causing this issue when we go to fix.

These errors are only thrown when double clicking on simulations in the local sqlite database. We believe the error is due to the controller using the old_api which works with the deployed ODM2 databases (postgres and mysql) only because they are implementing an older version of the ODM2 spec. These databases will need to be migrated to the same spec that our local sqlite database uses. To fix this bug we need to:

  1. update the view and controller to use the odm2api library.
  2. migrate postgres and mysql databases to the latest ODM2 specification
  3. remove the old_api entirely