Description
The confluence API throw a new exception after upgrade to the latest version.
Code snippets
if self._confluence.page_exists(self._space, title) and is_append:
self.append_report(title, html_content)
else:
if is_append:
print(f'Warning: Page {title} does not exist, creating a new page.')
try:
self._confluence.update_or_create(str(self._parent_id), title, html_content)
except Exception as e:
print(f"Warning: Failed to create or update page {title} due to {e}, try to add timestamp to the title.")
from datetime import datetime
title = f"{title} {datetime.now()}"
self._confluence.update_or_create(str(self._parent_id), title, html_content)
Error Message
packages/urllib3/connectionpool.py:1110: InsecureRequestWarning: Unverified HTTPS request is being made to host 'wiki.ith.intel.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
Traceback (most recent call last):
File "/home/erxin/jenkins/workspace/Huggingface_Benchmark_Native/qa/ipex-gpu/script/submit_confluence.py", line 125, in public_report_file
self._confluence.update_or_create(str(self._parent_id), title, html_content)
File "/home/erxin/jenkins/workspace/Huggingface_Benchmark_Native/v/lib/python3.12/site-packages/atlassian/confluence/server/__init__.py", line 2022, in update_or_create
space = self.get_page_space(parent_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/erxin/jenkins/workspace/Huggingface_Benchmark_Native/v/lib/python3.12/site-packages/atlassian/confluence/server/__init__.py", line 241, in get_page_space
page = self.get_content(page_id, expand="space")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/erxin/jenkins/workspace/Huggingface_Benchmark_Native/v/lib/python3.12/site-packages/atlassian/confluence/server/__init__.py", line 152, in get_content
return self.get(f"content/{content_id}", **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AtlassianRestAPI.get() got an unexpected keyword argument 'expand'
Environment
- OS Linux 807489 5.15.0-134-generic 145-Ubuntu
- Python version 3.12
- Bad version 5.0.3
- Good version 4.0.7
Description
The confluence API throw a new exception after upgrade to the latest version.
Code snippets
Error Message
Environment