Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User.get_stats() throws an error if no stars have been collected for a year #85

Closed
jokajak opened this issue Nov 20, 2022 · 1 comment
Closed

Comments

@jokajak
Copy link

jokajak commented Nov 20, 2022

The source of the https://adventofcode.com/{year}/leaderboard/self does not include an article tag which causes an exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jokajak/.cache/pypoetry/virtualenvs/aoc-coTrba3t-py3.10/lib/python3.10/site-packages/aocd/models.py", line 113, in get_stats
    if soup.article.pre is None and "overall leaderboard" in soup.article.text:
AttributeError: 'NoneType' object has no attribute 'pre'
wimglenn added a commit that referenced this issue Nov 20, 2022
User.get_stats() works even if no stars collected yet. closes #85
@wimglenn
Copy link
Owner

@jokajak Fixed in 1.2.1. Thanks for the report!

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

No branches or pull requests

2 participants