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

Downloading Fenix build with invalid platform raises an index error #664

Open
whimboo opened this issue Mar 26, 2024 · 6 comments · Fixed by #672
Open

Downloading Fenix build with invalid platform raises an index error #664

whimboo opened this issue Mar 26, 2024 · 6 comments · Fixed by #672

Comments

@whimboo
Copy link
Contributor

whimboo commented Mar 26, 2024

Using the following arguments from a non Android platform causes the code in DailyScraper to fail with an IndexError because there is no such build for such a platform.

mozdownload -a fenix -t daily -p mac

Traceback (most recent call last):
  File "/Users/henrik/code/mozdownload/venv/bin/mozdownload", line 33, in <module>
    sys.exit(load_entry_point('mozdownload', 'console_scripts', 'mozdownload')())
  File "/Users/henrik/code/mozdownload/mozdownload/cli.py", line 169, in cli
    build = factory.FactoryScraper(scraper_type, **kwargs)
  File "/Users/henrik/code/mozdownload/mozdownload/factory.py", line 126, in __init__
    scraper_types[scraper_type].__init__(self, **kwargs)
  File "/Users/henrik/code/mozdownload/mozdownload/scraper.py", line 383, in __init__
    Scraper.__init__(self, *args, **kwargs)
  File "/Users/henrik/code/mozdownload/mozdownload/scraper.py", line 165, in __init__
    self._retry_check_404(self.get_build_info)
  File "/Users/henrik/code/mozdownload/mozdownload/scraper.py", line 180, in _retry_check_404
    self._retry(func, **retry_kwargs)
  File "/Users/henrik/code/mozdownload/mozdownload/scraper.py", line 171, in _retry
    return redo.retry(func, **retry_kwargs)
  File "/Users/henrik/code/mozdownload/venv/lib/python3.10/site-packages/redo-2.0.4-py3.10.egg/redo/__init__.py", line 170, in retry
    return action(*args, **kwargs)
  File "/Users/henrik/code/mozdownload/mozdownload/scraper.py", line 434, in get_build_info
    self.date = self.get_latest_build_date()
  File "/Users/henrik/code/mozdownload/mozdownload/scraper.py", line 456, in get_latest_build_date
    date = ''.join(parser.entries[-1].split('-')[:6])
IndexError: list index out of range
@whimboo whimboo added this to the 1.29.0 milestone Mar 26, 2024
piri-p added a commit to piri-p/mozdownload that referenced this issue Apr 28, 2024
piri-p added a commit to piri-p/mozdownload that referenced this issue May 2, 2024
piri-p added a commit to piri-p/mozdownload that referenced this issue May 2, 2024
piri-p added a commit to piri-p/mozdownload that referenced this issue May 6, 2024
piri-p added a commit to piri-p/mozdownload that referenced this issue May 6, 2024
@whimboo whimboo reopened this May 6, 2024
@whimboo
Copy link
Contributor Author

whimboo commented May 6, 2024

PR #672 fixed only one case but we should still check early when checking command line arguments if the given platform is supported by the application.

@randomicon00
Copy link

Hello @whimboo, this is the first time contributing to this code base. I would like to try my hand at it!

@whimboo
Copy link
Contributor Author

whimboo commented Jun 14, 2024

Be welcome @randomicon00! It's great to see your interest. Let me know if you need further help to get started. You can ask here or as well join our Matrix channel. Thanks!

@whimboo
Copy link
Contributor Author

whimboo commented Jun 26, 2024

@randomicon00 have you had the time to check the exiting code? Do you have any issues where you would need help with? Thanks

@randomicon00
Copy link

Hi @whimboo! I've missed your first message (didn't get an email notification for it). I will start working on the task. I've already had a look at the source code before interacting here and I don't have any particular question. Thanks!

@whimboo
Copy link
Contributor Author

whimboo commented Jul 17, 2024

@randomicon00 I wanted to check in with you to see if any other issues have come up while you’ve been working on it. If you just need a bit more time, that's perfectly fine — just let me know. I want to ensure we stay in touch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants