populse / populse_mia

Multiparametric Image Analysis
Other
10 stars 9 forks source link

[DataBrowser] Boolean list, Time list and Datetime list types are not well managed #276

Closed servoz closed 2 years ago

servoz commented 2 years ago

Let's say we start from the following project:

Screenshot from 2022-06-13 17-54-12

For the datetime_list tag, if we change the value or, if, without changing the values, we just click on the OK button of the popup allowing to change the value: Screenshot from 2022-06-13 18-08-11

mia crash with the following exception:

  File "/data/Git_Projects/populse_mia/python/populse_mia/user_interface/data_browser/modify_table.py", line 185, in update_table_values
    subvalue = datetime.strptime(text, format)
  File "/usr/lib64/python3.8/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib64/python3.8/_strptime.py", line 352, in _strptime
    raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: :57.605529

Same thing with the time_list tag (time_list type):

Traceback (most recent call last):
  File "/data/Git_Projects/populse_mia/python/populse_mia/user_interface/data_browser/modify_table.py", line 189, in update_table_values
    subvalue = datetime.strptime(text, format).time()
  File "/usr/lib64/python3.8/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib64/python3.8/_strptime.py", line 352, in _strptime
    raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: :14.814666
ghost commented 2 years ago

Closed by 6bf69f9