Skip to content

Pelican import fails on tumblr blog entry #3177

Closed

Description

@boxydog
  • I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • OS version and name: OS X 12.6.7
  • Python version: 3.11.4
  • Pelican version: 4.8.0
  • Link to theme: n/a
  • Links to plugins: n/a
  • Link to your site: n/a
  • Link to your source: n/a
  • Link to a Gist with the contents of your settings file: n/a

Issue

Ran:

pelican-import --tumblr -o boxydog --blogname=boxydog my-api-key

Crashes on an entry in 2016:

Traceback (most recent call last):
  File "/Users/.../.venv/bin/pelican-import", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/.../.venv/lib/python3.11/site-packages/pelican/tools/pelican_import.py", line 1019, in main
    fields2pelican(fields, args.markup, args.output,
  File "/Users/.../.venv/lib/python3.11/site-packages/pelican/tools/pelican_import.py", line 784, in fields2pelican
    for (title, content, filename, date, author, categories, tags, status,
  File "/Users/.../.venv/lib/python3.11/site-packages/pelican/tools/pelican_import.py", line 505, in tumblr2fields
    players = '\n'.join(player.get('embed_code')
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, bool found

I bet it's this entry: https://www.tumblr.com/boxydog/148936576299/two-opposite-personalities-one-driven-to-big

It looks to have a broken youtube embed.

Activity

  1. added 2 commits that reference this issue on Aug 21, 2023
    0bcb1ad
    deebda5
  2. willthong commented on Aug 21, 2023

    @willthong
    Contributor

    Correct! I've suggested an edit and submitted a PR to deal with this case where a Tumblr video link to an orphaned video doesn't exist so pelican-import crashes. Thanks!

  3. boxydog commented on Aug 21, 2023

    @boxydog
    ContributorAuthor

    Thanks so much.

  4. added this to the Pelican 4.9 milestone on Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions