hugovk/pypistats

ValueError: month must be in 1..12

Closed this issue · 0 comments

$ pypistats python_minor pylast -m 2018-11
| category | percent | downloads |
|----------|--------:|----------:|
|      2.7 |  48.62% |     2,307 |
|      3.6 |  31.63% |     1,501 |
| null     |   7.31% |       347 |
|      3.7 |   6.91% |       328 |
|      3.5 |   4.85% |       230 |
|      3.4 |   0.59% |        28 |
|      3.3 |   0.08% |         4 |
| Total    |         |     4,745 |

$ pypistats python_minor pylast -m 2018-12
Traceback (most recent call last):
  File "/usr/local/bin/pypistats", line 11, in <module>
    load_entry_point('pypistats', 'console_scripts', 'pypistats')()
  File "/Users/hugo/github/pypistats/pypistats/cli.py", line 266, in main
    args.start_date, args.end_date = _month(args.month)
  File "/Users/hugo/github/pypistats/pypistats/cli.py", line 246, in _month
    last = date(year, month + 1, 1) - relativedelta(days=1)
ValueError: month must be in 1..12

$ pypistats python_minor pylast -m 2017-12
Traceback (most recent call last):
  File "/usr/local/bin/pypistats", line 11, in <module>
    load_entry_point('pypistats', 'console_scripts', 'pypistats')()
  File "/Users/hugo/github/pypistats/pypistats/cli.py", line 266, in main
    args.start_date, args.end_date = _month(args.month)
  File "/Users/hugo/github/pypistats/pypistats/cli.py", line 246, in _month
    last = date(year, month + 1, 1) - relativedelta(days=1)
ValueError: month must be in 1..12