Skip to content

[Confluence] Getting Error 500 when creating or updating a confluence page #1683

Description

@li-sd001

I'm trying to create a script that creates/updates pages on Confluence Cloud and I have the following code:

from atlassian import ConfluenceV2
from dotenv import dotenv_values

confluence = ConfluenceV2(
    url=dotenv_values('.env')['CLOUD_URL'],
    username=dotenv_values('.env')['EMAIL'],
    password=dotenv_values('.env')['API_TOKEN']
)

try:
    page_id = confluence.get_page_id("PSL", "System Validation Test Reports")
    space_id = confluence.get_page_space(page_id)["spaceId"]
    page = confluence.create_page(space_id=space_id, title="Hello", body="World")
except Exception as e:
    print(f"Error: {e.response.content}")

But when I run it, it keeps:

  1. Returning "Deprecation warning" error message even though I explicitly used ConfluenceV2
  2. Getting response 500
DeprecationWarning: V1 methods are deprecated in ConfluenceCloud. Use V2 methods instead.
  confluence = ConfluenceV2(
Error: b'{"errors":[{"status":500,"code":"INTERNAL_SERVER_ERROR","title":"Internal Server Error","detail":null}]}'

I'm able to get the page_id and space_id with no issues, but I'm getting HTTP response 500 also when I use confluence.update_page()

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions