atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

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

Open payalcha opened 5 months ago

payalcha commented 5 months ago

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
gonchik commented 5 months ago

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

payalcha commented 5 months ago

Python 3.8 and Python 3.10 both I tried.

payalcha commented 5 months ago

@gonchik Anything we can do to fix this issue.

bareblackfoot commented 3 months ago

Same error here