Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding generated code

shraddha anikhindi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 30, 2025

I have generated code using Openapi with https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get but its showing issue with the deserialize method in it getting below error

klass.attribute_map[attr] in data and
TypeError: a bytes-like object is required, not 'str'

unable to solve this issue

1 answer

0 votes
Brant Schroeder
Community Champion
July 30, 2025

@shraddha anikhindi welcome to the Atlassian community

The TypeError: a bytes-like object is required, not 'str' indicates that a function or operation expects data in a binary format (bytes), but it received a standard Python string (str) instead.

You will need to update your code so it passes the proper object type to the API.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events