-
Notifications
You must be signed in to change notification settings - Fork 481
Search plugins storing BeautifulSoup objects in Entry cause excessive recursion in Entry::take_snapshot #1301
Copy link
Copy link
Closed
Labels
Description
Expected behaviour:
Flexget doesn't crash.
Actual behaviour:
Flexget crashes due to excessive recursion depth while taking the snapshot of an entry produced by the TorrentLeech search plugin.
Steps to reproduce:
Use the TorrentLeech search plugin in a task.
Config (snippet):
tasks:
tv-discover:
interval: 12 hours
discover:
what:
- next_series_episodes: yes
from:
- torrentleech:
rss_key: "{{ secrets.torrentleech.rsskey }}"
username: "{{ secrets.torrentleech.username }}"
password: "{{ secrets.torrentleech.password }}"
category: Episodes HD
transmission: yes
Additional information:
- Flexget Version: 2.2.1
- Python Version: 2.7.12
- Installation method: pip
- OS and version: Fedora 24 x86_64
- Link to crash log: https://gist.github.com/danielkza/d6e8c98b31037de731c5b5ac76733b39
Debugging information
I'm not familiar with the Flexget codebase, but some quick debugging shows the problem is caused by the TL plugin inserting some text directly from the HTML tree produced by BeautifulSoup. That text is actually a bs4.element.NavigableString that contains references to the whole tree, which Flexget attempts to serialize when saving a snapshot of the entry.
The plugin should convert any such usages to unicode before storing it in the entry. It is possible other search plugins have the same issue, so a generic solution might be desirable.
Reactions are currently unavailable