karplus / PteroDAQ

Other
3 stars 2 forks source link

Notes not saved if no data recorded #18

Closed karplus closed 9 years ago

karplus commented 10 years ago

Original report by kevin_karplus (Bitbucket: kevin_karplus, ).


If you try to save the notes before recording any data you get an error:

#!

Exception in Tkinter callback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tkinter/__init__.py", line 1482, in __call__
    return self.func(*args)
  File "pterodaq/daq/gui.py", line 278, in savefile
    daq.save(fn, notesbox.get('1.0', 'end'), powervar.get())
  File "pterodaq/daq/core.py", line 79, in save
    if isinstance(self.conf[0], TriggerTimed):
AttributeError: 'DataAcquisition' object has no attribute 'conf'
karplus commented 9 years ago

Original comment by kevin_karplus (Bitbucket: kevin_karplus, ).


Still needs fixing. Problem is that conf is set by starting running. Should also be set by save, but only if not already set—want it to stay consistent with data.

karplus commented 9 years ago

Original comment by kevin_karplus (Bitbucket: kevin_karplus, ).


Fixed by sending full configuration information to savefile, rather than just channels. Use new configuration information for channel names, but saved info for everything else (if saved information exists).