You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If some utt functionality is used incorrectly, it provides quite a nice output like: "unrecognized argument" or something like this, however that's not the case with date usage in utt report.
To replicate simply run utt report 2022-02-20 or really anything that doesn't match %Y-%m-%d format.
The result will be: Traceback (most recent call last): File "/opt/homebrew/bin/utt", line 8, in <module> sys.exit(main()) File "/opt/homebrew/lib/python3.9/site-packages/utt/__main__.py", line 9, in main main() File "/opt/homebrew/lib/python3.9/site-packages/utt/main.py", line 37, in main _v1._private.container[command.handler_class]() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 68, in __getitem__ return self._pipeline.execute(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 80, in execute return self._stages.execute(key) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 20, in execute return next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 54, in execute dependency_value = next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 107, in execute return self._middleware.execute(key, self._should_never_be_called) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 28, in execute dependencies = self._resolve_dependencies(dependency_spec.dependency_types) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 34, in _resolve_dependencies return [ File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 35, in <listcomp> self._resolve_dependency(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 68, in __getitem__ return self._pipeline.execute(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 80, in execute return self._stages.execute(key) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 20, in execute return next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 54, in execute dependency_value = next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 107, in execute return self._middleware.execute(key, self._should_never_be_called) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 28, in execute dependencies = self._resolve_dependencies(dependency_spec.dependency_types) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 34, in _resolve_dependencies return [ File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 35, in <listcomp> self._resolve_dependency(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 68, in __getitem__ return self._pipeline.execute(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 80, in execute return self._stages.execute(key) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 20, in execute return next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 54, in execute dependency_value = next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 107, in execute return self._middleware.execute(key, self._should_never_be_called) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 29, in execute return dependency_spec.instantiate(*dependencies) File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 257, in report_args report_range = parse_report_range_arguments( File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 44, in parse_report_range_arguments report_date = parse_date(today, unparsed_report_date) File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 70, in parse_date return parse_absolute_date(datestring) File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 74, in parse_absolute_date return datetime.datetime.strptime(datestring, "%Y-%m-%d").date() File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '324-4242-43' does not match format '%Y-%m-%d'
More desired behavior would be some user-friendly error message.
The text was updated successfully, but these errors were encountered:
If some utt functionality is used incorrectly, it provides quite a nice output like: "unrecognized argument" or something like this, however that's not the case with date usage in
utt report
.To replicate simply run
utt report 2022-02-20
or really anything that doesn't match %Y-%m-%d format.The result will be:
Traceback (most recent call last): File "/opt/homebrew/bin/utt", line 8, in <module> sys.exit(main()) File "/opt/homebrew/lib/python3.9/site-packages/utt/__main__.py", line 9, in main main() File "/opt/homebrew/lib/python3.9/site-packages/utt/main.py", line 37, in main _v1._private.container[command.handler_class]() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 68, in __getitem__ return self._pipeline.execute(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 80, in execute return self._stages.execute(key) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 20, in execute return next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 54, in execute dependency_value = next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 107, in execute return self._middleware.execute(key, self._should_never_be_called) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 28, in execute dependencies = self._resolve_dependencies(dependency_spec.dependency_types) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 34, in _resolve_dependencies return [ File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 35, in <listcomp> self._resolve_dependency(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 68, in __getitem__ return self._pipeline.execute(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 80, in execute return self._stages.execute(key) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 20, in execute return next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 54, in execute dependency_value = next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 107, in execute return self._middleware.execute(key, self._should_never_be_called) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 28, in execute dependencies = self._resolve_dependencies(dependency_spec.dependency_types) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 34, in _resolve_dependencies return [ File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 35, in <listcomp> self._resolve_dependency(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 68, in __getitem__ return self._pipeline.execute(dependency_type) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 80, in execute return self._stages.execute(key) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 20, in execute return next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in execute return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/middlewares.py", line 54, in execute dependency_value = next_middleware() File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 95, in <lambda> return self._middleware.execute(key, lambda: self._next_stage.execute(key)) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 107, in execute return self._middleware.execute(key, self._should_never_be_called) File "/opt/homebrew/lib/python3.9/site-packages/cargo/_container.py", line 29, in execute return dependency_spec.instantiate(*dependencies) File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 257, in report_args report_range = parse_report_range_arguments( File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 44, in parse_report_range_arguments report_date = parse_date(today, unparsed_report_date) File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 70, in parse_date return parse_absolute_date(datestring) File "/opt/homebrew/lib/python3.9/site-packages/utt/components/report_args.py", line 74, in parse_absolute_date return datetime.datetime.strptime(datestring, "%Y-%m-%d").date() File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '324-4242-43' does not match format '%Y-%m-%d'
More desired behavior would be some user-friendly error message.
The text was updated successfully, but these errors were encountered: