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

import_wordpress: TypeError: 'bool' object is not subscriptable #3810

Open
madic-creates opened this issue Jan 12, 2025 · 2 comments
Open

import_wordpress: TypeError: 'bool' object is not subscriptable #3810

madic-creates opened this issue Jan 12, 2025 · 2 comments
Labels

Comments

@madic-creates
Copy link

Environment

Python Version: 3.13

Nikola Version: 8.3.1 (also tested with git)

Operating System: Arch Linux

Description:

I wanted to import the WordPress export from the site of one of my side projects to nikola and got the following error:

[...]
[2025-01-12 10:05:58] INFO: import_wordpress: Downloading https://static.furious-gaming.de/wp-content/uploads/2016/01/teamspeak-logo.png => new_site/files/wp-content/uploads/2016/01/teamspeak-logo.png
[2025-01-12 10:05:58] INFO: import_wordpress: Downloading https://static.furious-gaming.de/wp-content/uploads/2016/01/teamspeak-logo-150x131.png => new_site/files/wp-content/uploads/2016/01/teamspeak-logo-150x131.png
[2025-01-12 10:05:58] INFO: import_wordpress: Downloading https://static.furious-gaming.de/wp-content/uploads/2016/01/teamspeak-logo-300x127.png => new_site/files/wp-content/uploads/2016/01/teamspeak-logo-300x127.png
[2025-01-12 10:05:58] INFO: import_wordpress: Downloading https://static.furious-gaming.de/wp-content/uploads/2016/01/teamspeak-logo-175x131.png => new_site/files/wp-content/uploads/2016/01/teamspeak-logo-175x131.png
[2025-01-12 10:05:58] INFO: import_wordpress: Downloading https://static.furious-gaming.de/wp-content/uploads/2016/01/teamspeak-logo-60x60.png => new_site/files/wp-content/uploads/2016/01/teamspeak-logo-60x60.png
Traceback (most recent call last):
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/doit/doit_cmd.py", line 294, in run
    return command.parse_execute(args)
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/doit/cmd_base.py", line 150, in parse_execute
    return self.execute(params, args)
           ~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/nikola/plugin_categories.py", line 132, in execute
    return self._execute(options, args)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/nikola/plugins/command/import_wordpress.py", line 395, in _execute
    self.import_posts(channel)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/nikola/plugins/command/import_wordpress.py", line 1151, in import_posts
    self.process_item_if_attachment(item)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/nikola/plugins/command/import_wordpress.py", line 1114, in process_item_if_attachment
    data = self.import_attachment(item, wordpress_namespace)
  File "/home/mne-adm/venv/nikola/lib/python3.13/site-packages/nikola/plugins/command/import_wordpress.py", line 634, in import_attachment
    filename = metadata[size_key][size][file_key]
               ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'bool' object is not subscriptable

If you would like to have the wordpress xml export, can you tell me a way on how I can provide it?

@Kwpolska
Copy link
Member

Kwpolska commented Jan 12, 2025

You should be able to upload the XML export here or somewhere else. It’s possible that WordPress changed their file structure or something.

@madic-creates
Copy link
Author

The wordpress export:
furious-gamingde.WordPress.2025-01-12.tar.gz

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

No branches or pull requests

2 participants