atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte

Open payalcha opened this issue 2 years ago • 4 comments

While using confluence = Confluence(url=wiki_url, token=token, verify_ssl=ssl_cert_path, api_version="cloud") confluence.get_page_as_pdf(page_id) or confluence.export_page(page_id)

I am getting below error

Traceback (most recent call last):
  File "confluence_pull.py", line 76, in <module>
    jira_obj.download_page_id(page_id_list[0], folder_path)
  File "confluence_pull.py", line 55, in download_page_id
    self.wiki_conn.get_page_as_pdf(page_id)
  File "/var/github/workspace/venv2/lib/python3.8/site-packages/atlassian/confluence.py", line 2471, in get_page_as_pdf
    url = self.get_pdf_download_url_for_confluence_cloud(url)
  File "/var/github/workspace/venv2/lib/python3.8/site-packages/atlassian/confluence.py", line 2717, in get_pdf_download_url_for_confluence_cloud
    response_string = response.decode(encoding="utf-8", errors="strict")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte

payalcha avatar Jan 12 '24 08:01 payalcha

Hi @payalcha , which version of python do you use?

gonchik avatar Jan 12 '24 19:01 gonchik

Python 3.8 and Python 3.10 both I tried.

payalcha avatar Jan 16 '24 02:01 payalcha

@gonchik Anything we can do to fix this issue.

payalcha avatar Jan 22 '24 15:01 payalcha

Same error here

bareblackfoot avatar Mar 18 '24 08:03 bareblackfoot