You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Using PIP module atlassian-python-api
The following fails with error
requests.exceptions.HTTPError: com.atlassian.confluence.api.service.exceptions.BadRequestException: Content body cannot be converted to new editor format
from atlassian import Confluence
conf = Confluence(url=conf_site, username=CONF_USER, password=CONF_TOKEN)
page_id = conf.get_page_id(page_space, page_title)
page = conf.get_page_by_id(page_id, expand="body.storage")
page_content = page["body"]["storage"]["value"]
html_table = "<table>Prod version updated<table />"
conf.update_page(page_id, page_title, html_table)
Similar code block to passing case also fails:
from atlassian import Confluence
conf = Confluence(url=conf_site, username=CONF_USER, password=CONF_TOKEN)
page_id = conf.get_page_id(page_space, page_title)
page = conf.get_page_by_id(page_id, expand="body.storage")
page_content = page["body"]["storage"]["value"]
html_table = "Prod version updated</table>"
conf.update_page(page_id, page_title, html_table)
However this does not:
from atlassian import Confluence
conf = Confluence(url=conf_site, username=CONF_USER, password=CONF_TOKEN)
page_id = conf.get_page_id(page_space, page_title)
page = conf.get_page_by_id(page_id, expand="body.storage")
page_content = page["body"]["storage"]["value"]
html_table = "Prod version updated<table />"
conf.update_page(page_id, page_title, html_table)
The code is valid HTML. What is wrong here?