sphinx-contrib / confluencebuilder

Confluence Markup Builder Plugin for Sphinx
BSD 2-Clause "Simplified" License
315 stars 99 forks source link

Repeated `KeyError: 'id'` when updating pages #959

Closed adamtheturtle closed 5 months ago

adamtheturtle commented 5 months ago

I haven't yet understood which cases cause this:

line 1556, in _update_page
    updated_prop['id'] = orig_entry['id']
                         ~~~~~~~~~~^^^^^^
KeyError: 'id'

When I inspect a little, I get:

(Pdb++) orig_entry
{'value': None}
(Pdb++) orig_meta_props
{'content-appearance-published': {'value': None}, 'editor': {'value': 'v2', 'key': 'editor', 'id': '4034888037', 'version': {'number': 1, 'message': '', 'minorEdit': False, 'authorId': '63487bd9db32d9ce175d8c20', 'createdAt': '2024-04-12T17:47:02.281Z'}}}
jdknight commented 5 months ago

Just to check, are you running v2.5.1? The issue looks similar to https://github.com/sphinx-contrib/confluencebuilder/issues/953 (fixed in https://github.com/sphinx-contrib/confluencebuilder/pull/954).

adamtheturtle commented 5 months ago

🤦 Apologies, and good spot - I should have checked and included the version, and updating to 2.5.1 fixes the issue!