question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`arrow.get` raised wrong exception

See original GitHub issue
In [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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tvytlxcommented, Dec 21, 2018

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 (not pip install -e .) to reproduce

0reactions
tvytlxcommented, Dec 22, 2018

👌

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found