pyControl / code

pyControl GUI and framework code
https://pycontrol.readthedocs.io
GNU General Public License v3.0
23 stars 20 forks source link

Data_logger end_datetime error #94

Closed alustig3 closed 1 year ago

alustig3 commented 1 year ago

I get the following error when stopping a task in which the data is being recorded:

File "/Users/lustiga/Dropbox (HHMI)/Code/karpova_lab/pyControl/pyControl_official/com/data_logger.py", line 71, in close_files
    self.write_info_line("end_time", self.end_datetime.isoformat(timespec="milliseconds"), self.end_timestamp)
AttributeError: 'Data_logger' object has no attribute 'end_datetime'

I looks like self.end_datetime is never given a value because the following code is never reached https://github.com/pyControl/code/blob/7b4b0a890832fec38e90f71f5c38929978e83692/com/data_logger.py#L117-L119

ThomasAkam commented 1 year ago

The functionallity to store end datetimes to file is working fine on my machine - both for tasks stopped using the stop_framework() function in task code or stopped from the GUI. Are you getting this issue with the standard dev branch code?

alustig3 commented 1 year ago

Sorry, I'm 95% sure I was on the dev branch, but for the life of me I can't replicate the error this morning haha. Closing the issue.