`arrow.get` raised wrong exception
See original GitHub issueIn [3]: arrow.get('20171017', ['YYYY.M.D'])
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-7623ecb42ca2> in <module>()
----> 1 arrow.get('20171017', ['YYYY.M.D'])
...
--> 269 tzinfo=parts.get('tzinfo'))
270
271 def _parse_multiformat(self, string, formats):
ValueError: month must be in 1..12
I think it should raise ParserError
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:10 (1 by maintainers)
Top Results From Across the Web
`arrow.get` raised wrong exception · Issue #535 - GitHub
Trying to trace the calls I think it's being raised on https://github.com/crsmithdev/arrow/blob/master/arrow/parser.py#L269 but I don't have ...
Read more >Arrow successfully parses some input not in default patterns
It seems to raise an exception if you provide 'accepted' formats as an argument - e.g. arrow.get('09-10-2017', ['YYYY-MM-DD']) throws an error.
Read more >8. Errors and Exceptions — Python 3.11.1 documentation
When an exception is created in order to be raised, it is usually initialized with information that describes the error that has occurred....
Read more >Raise On Developer Mistake - Ruby Pigeon
At a bare minimum, a raised exception indicates that something has gone wrong, which is better than failing silently. A good exception will...
Read more >8. Errors and Exceptions — Python 3.6.3 documentation
The parser repeats the offending line and displays a little 'arrow' pointing at the earliest point in the line where the error was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this commit https://github.com/crsmithdev/arrow/commit/3f67c8be2cff3e9f634a31e4a48a2c1bf4e0eaa0 not included in the 0.12.1 version, that’s why the dot didn’t escape, and I think you run the code on master, you should use
pip install arrow
(notpip install -e .
) to reproduce👌