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

Problem with the GitLab url formatting if the url is not in required format #1073

Closed
dixong opened this issue Dec 1, 2022 · 0 comments · Fixed by #1074
Closed

Problem with the GitLab url formatting if the url is not in required format #1073

dixong opened this issue Dec 1, 2022 · 0 comments · Fixed by #1074

Comments

@dixong
Copy link
Contributor

dixong commented Dec 1, 2022

The following exception occurs if a GitLab url is not in the required format:

Exception occurred:
  File "c:\dev\gitlab\aero-software\internal\docs\venv\lib\site-packages\pydata_sphinx_theme\__init__.py", line 998, in parse_url
    group_and_subgroups, parts, *_ = path.split("/-/")
ValueError: not enough values to unpack (expected at least 2, got 1)

The code expects the following format: -

https://gitlab.com/gitlab-org/gitlab-foss/-/issues/23251

However it is possible to use a different format, that when accessed via GitLab website will change to the expected format.

https://gitlab.com/gitlab-org/gitlab-ce/issues/23251

We should expect the build process to complete even with url's that don't conform to the expected format.

dixong added a commit to dixong/pydata-sphinx-theme that referenced this issue Dec 1, 2022
Make sure the /-/ string exists in path before splitting the path to avoid exception
12rambau pushed a commit that referenced this issue Dec 1, 2022
* Check for /-/ in GitLab url (closes #1073)

Make sure the /-/ string exists in path before splitting the path to avoid exception

* Adjust formatting to fit line length

* Add non-standard GitLab Url test
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

Successfully merging a pull request may close this issue.

1 participant