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

list index out of range in _get_pandoc_urls #295

Closed
kevalmorabia97 opened this issue Sep 19, 2022 · 2 comments
Closed

list index out of range in _get_pandoc_urls #295

kevalmorabia97 opened this issue Sep 19, 2022 · 2 comments

Comments

@kevalmorabia97
Copy link

Traceback (most recent call last):
  File "/tmp/runner/build-docs/lib/python3.8/site-packages/sphinx/config.py", line 347, in eval_config_file
    exec(code, namespace)
  File "/home/runner/work/<org>/<repo>/docs/source/conf.py", line 37, in <module>
    download_pandoc(
  File "/tmp/runner/build-docs/lib/python3.8/site-packages/pypandoc/pandoc_download.py", line 228, in download_pandoc
    pandoc_urls, _ = _get_pandoc_urls(version)
  File "/tmp/runner/build-docs/lib/python3.8/site-packages/pypandoc/pandoc_download.py", line 57, in _get_pandoc_urls
    version = pandoc_urls_list[0].split('/')[5]
IndexError: list index out of range

Seems like the logic to load the releases/ page has an empty list of URLs since it takes some time to load the URLs. This needs to be fixed ASAP as it breaks the use of pypandoc in all existing pipelines.

@JessicaTegner
Copy link
Owner

THanks for catching this.
It seems that GitHub has changed, how the release page are loaded.

I have a fix that I'm working on, that involves using api.github.com, that should be ready later.

The pr will be up later, for everyone to comment on before merging

@davidbgk
Copy link

Without using the API, I found that you can get direct links via that kind of URLs:

https://github.com/jgm/pandoc/releases/expanded_assets/2.19.2

Hope it helps! And I'll happily review a PR given that it breaks my current CI workflow :)

JessicaTegner added a commit that referenced this issue Sep 22, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
* Updated logic to get pandoc releases - issue #295

* Updated appveyor script

* Updated how get get the versions from GitHub, including handling of latest

* Performance enhancement suggested by @davidbgk

* Updated the way we get the version number from the fractured url

* Hey let's not dublicate the runners
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

3 participants