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

Pelican import fails on tumblr blog entry #3177

Closed
2 tasks done
boxydog opened this issue Aug 19, 2023 · 2 comments · Fixed by #3218
Closed
2 tasks done

Pelican import fails on tumblr blog entry #3177

boxydog opened this issue Aug 19, 2023 · 2 comments · Fixed by #3218
Labels
Milestone

Comments

@boxydog
Copy link
Contributor

boxydog commented Aug 19, 2023

  • 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.

@willthong
Copy link
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!

@boxydog
Copy link
Contributor Author

boxydog commented Aug 21, 2023

Thanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
3 participants