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

Ignore all errors when trying to unpack refs from an external library #383

Merged
merged 2 commits into from
Jun 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/doc_builder/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get_objects_map(package_name, version="main", language="en", repo_owner="hug
object_lines = reader.readlines()[4:]
object_data = zlib.decompress(b"".join(object_lines)).decode().split("\n")
return post_process_objects_inv(object_data, doc_url)
except requests.HTTPError:
except Exception:
return {}


Expand All @@ -142,6 +142,7 @@ def get_external_object_link(object_name, page_info):
return f"`{link_name}`"

if package_name not in EXTERNAL_DOC_OBJECTS_CACHE:
print(package_name)
sgugger marked this conversation as resolved.
Show resolved Hide resolved
EXTERNAL_DOC_OBJECTS_CACHE[package_name] = get_objects_map(package_name, version=version, language=language)
object_url = EXTERNAL_DOC_OBJECTS_CACHE[package_name].get(object_name, None)

Expand Down