Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Pydantic throws error on story upload. #1881

Open
xIvan0ff opened this issue Apr 16, 2024 · 1 comment
Open

[BUG] Pydantic throws error on story upload. #1881

xIvan0ff opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@xIvan0ff
Copy link

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 xIvan0ff added the bug Something isn't working label Apr 16, 2024
@xIvan0ff xIvan0ff changed the title [BUG] Pydantic [BUG] Pydantic throws error on story upload. Apr 16, 2024
@tajbowness
Copy link
Contributor

Similar issue:

#1851 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants