I am attempting to publish documents to Confluence cloud using sphinxcontrib-confluencebuilder.
I get an error as follows
REQ: POST
RSP: 400
URL: https://crimsonmacaw.atlassian.net/wiki/rest/api
API: content
DATA: {
"statusCode": 400,
"data": {
"authorized": true,
"valid": false,
"errors": [
{
"message": {
"key": "You must specify a space key or space id for new content.",
"args": []
}
}
],
"successful": false
},
"message": "com.atlassian.confluence.api.service.exceptions.BadRequestException: Could not create content with type page"
}
I do have a valid space key. When I set `confluence_publish_debug=True` I see two HTTP GET statements with an HTTP status of 200, both of which have the space key.
I then get the HTTP400 message above.
Looking at `conf.py` I have the following settings
confluence_purge = False
confluence_ask_password = False
confluence_global_labels = python_labels
confluence_parent_page = "Python Repositories"
confluence_parent_page_id_check = 3016196097
confluence_append_labels = True
confluence_remove_title = False
confluence_use_index = False
confluence_page_hierarchy = True
confluence_publish_dryrun = False
confluence_prev_next_buttons_location = 'both'
confluence_header_file = "/opt/docs/sphinx/assets/page_header.tpl"
confluence_publish_debug = False
confluence_publish = True
confluence_space_key = 'TECH' # space_key
The extensions I am using are as follow
extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.duration",
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinxcontrib.confluencebuilder",
"myst_parser",
"sphinx_markdown_tables",
]
source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
}
source_suffix = [".rst", ".md", ".py"]
The Python library versions I am using are
sphinx==5.0.2
sphinx-markdown-tables==0.0.17
recommonmark==0.7.1
sphinxcontrib-confluencebuilder==1.8.0
I have not included confluence server, user and password for obvious reasons though they are in my conf.py
I can clearly see that
confluence_space_key = 'TECH' # space_key
So how can the Confluence API think I'm sending an empty key?