instagrapi icon indicating copy to clipboard operation
instagrapi copied to clipboard

[BUG] Pydantic throws error on story upload.

Open xIvan0ff opened this issue 10 months ago • 1 comments

Describe the bug Pydantic says that 'is_paid_partnership' field is required in order to post a story.

To Reproduce

client = Client()
client.login('xxx', 'xxx')

story = client.photo_upload_to_story('FAQS.png')
print(story)

Traceback

Traceback (most recent call last):
  File "\test.py", line 8, in <module>
    story = client.photo_upload_to_story('FAQS.png')
  File "C:\Users\XXX\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\photo.py", line 417, in photo_upload_to_story
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for Story
is_paid_partnership
  Field required [type=missing, input_value={'links': [], 'mentions':...], 'clips_metadata': {}}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.6/v/missing

Expected behavior Should not give errors.

Desktop (please complete the following information):

  • OS: Python
  • Python version 3.10.5
  • instagrapi version 2.1.1

xIvan0ff avatar Apr 16 '24 18:04 xIvan0ff

Similar issue:

https://github.com/subzeroid/instagrapi/issues/1851#issue-2204514201

tajbowness avatar Apr 16 '24 21:04 tajbowness