[PR #75] [MERGED] Treat AttributeError as an acceptable parse failure #1050

Closed
opened 2026-03-01 14:48:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/75
Author: @cdzombak
Created: 3/19/2018
Status: Merged
Merged: 3/19/2018
Merged by: @pirate

Base: masterHead: attribute-error


📝 Commits (1)

  • f072c7e Treat AttributeError as an expected parse failure

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 parse.py (+1 -1)

📄 Description

This PR intends to fix the following stacktrace when updating from a Pinboard RSS feed:

Traceback (most recent call last):
 File "./archive.py", line 115, in <module>
   links = get_links(source, archive_path=archive_path)
 File "./archive.py", line 46, in get_links
   raw_links = parse_links(new_links_file_path)
 File "/home/cdzombak/bookmark-archiver/parse.py", line 52, in parse_links
   links += list(parser_func(file))
 File "/home/cdzombak/bookmark-archiver/parse.py", line 209, in parse_medium_rss_feed
   items = root.find("channel").findall("item")
AttributeError: 'NoneType' object has no attribute 'findall'

I think #71 should have added AttributeError as another error which indicates the parser that's being tried doesn't work on the given input.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/75 **Author:** [@cdzombak](https://github.com/cdzombak) **Created:** 3/19/2018 **Status:** ✅ Merged **Merged:** 3/19/2018 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `master` ← **Head:** `attribute-error` --- ### 📝 Commits (1) - [`f072c7e`](https://github.com/ArchiveBox/ArchiveBox/commit/f072c7e22a93570465cc0b1b9b0991a1586eaa7f) Treat AttributeError as an expected parse failure ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `parse.py` (+1 -1) </details> ### 📄 Description This PR intends to fix the following stacktrace when updating from a Pinboard RSS feed: ``` Traceback (most recent call last): File "./archive.py", line 115, in <module> links = get_links(source, archive_path=archive_path) File "./archive.py", line 46, in get_links raw_links = parse_links(new_links_file_path) File "/home/cdzombak/bookmark-archiver/parse.py", line 52, in parse_links links += list(parser_func(file)) File "/home/cdzombak/bookmark-archiver/parse.py", line 209, in parse_medium_rss_feed items = root.find("channel").findall("item") AttributeError: 'NoneType' object has no attribute 'findall' ``` I think #71 should have added `AttributeError` as another error which indicates the parser that's being tried doesn't work on the given input. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 14:48:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1050
No description provided.