Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: time_input failing with parsed dates #21

Open
rmm-ch opened this issue Jan 17, 2025 · 0 comments
Open

bug: time_input failing with parsed dates #21

rmm-ch opened this issue Jan 17, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@rmm-ch
Copy link
Collaborator

rmm-ch commented Jan 17, 2025

We use a st.time_input element to define the timestamp of the input image.
If the image has no valid metadata, the user has to define the time.

For reasons I do not yet understand, creating a legitimate datetime object by parsing a legitimate string works for the st.date_input but not for the time_input.

date_value = datetime.datetime.strptime(image_datetime, '%Y:%m:%d %H:%M:%S').date()
time_value = datetime.datetime.strptime(image_datetime, '%Y:%m:%d %H:%M:%S').time()

found when working on fix for #16, not a quick fix so raising new issue.

@rmm-ch rmm-ch added the bug Something isn't working label Jan 17, 2025
rmm-ch added a commit that referenced this issue Jan 17, 2025
- resolves #16 by removing the spoof_metadata; now the user should enter
  data
- some strange behaviour with the time coming from the file metadata,
  see #21.

- workflow changed so that now:
  1. the user must fill all fields before the validate button is activated
  2. the user must click validate before the classifier button is activated

- implementation for (1) is handled by adding unique keys to all the
  input elements, and adding `check_inputs_are_set -> bool` to ease
  checking the whole group.
@rmm-ch rmm-ch added this to the UI: input handling milestone Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant