Skip to content

Fix #61: NameError in validate_and_compare_dates due to incorrect _input variables#65

Open
Rahul-2k4 wants to merge 1 commit intofwitmer:masterfrom
Rahul-2k4:master
Open

Fix #61: NameError in validate_and_compare_dates due to incorrect _input variables#65
Rahul-2k4 wants to merge 1 commit intofwitmer:masterfrom
Rahul-2k4:master

Conversation

@Rahul-2k4
Copy link

Fixes #61

This PR fixes a critical variable-name bug in validate_and_compare_dates within DeeringAutoDownloadCode.py.

Issue:
The function accepts start_date and end_date as parameters but incorrectly attempts to parse undefined variables start_date_input and end_date_input. This caused a NameError and broke the date validation flow. These lines were also redundant given the existing parsing logic.

Fix:

  • Removed references to the undefined _input variables.
  • Used the function parameters start_date and end_date directly for parsing.
  • Renamed the parsed datetime objects to start_date_dt and end_date_dt for clarity.

This resolves the NameError and restores proper date validation behavior.

- Remove buggy lines referencing undefined start_date_input and end_date_input
- Use function parameters start_date and end_date correctly
- Introduce start_date_dt and end_date_dt for parsed datetime objects
- Update docstring format to standard Python documentation style
- Improve code clarity and maintainability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Critical Bug — Variable Name Error in Date Validation (DeeringAutoDownloadCode.py)

1 participant