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

Fixes #1412 #1413

Merged
merged 4 commits into from Dec 22, 2020
Merged

Fixes #1412 #1413

merged 4 commits into from Dec 22, 2020

Conversation

fkropfhamer
Copy link
Contributor

Fixes #1412 by transforming file argument to bytes and passing to imghdr.what in api.media_upload

@5ym
Copy link

5ym commented Sep 28, 2020

This is an important feature. Please release as soon as possible.

@5ym
Copy link

5ym commented Sep 28, 2020

I get the same error with update_profile_banner.

image

@HoodyH
Copy link

HoodyH commented Oct 6, 2020

Same problem here

@leoffx
Copy link

leoffx commented Nov 6, 2020

I had the same problem, and this branch fixed it for me! I hope this get merged soon, thank you!

Copy link
Member

@Harmon758 Harmon758 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will error with AttributeError: 'NoneType' object has no attribute 'read' when file is not passed.

@Harmon758 Harmon758 added Bug This is regarding a bug with the library Need Follow-Up This needs to be followed up on to be actionable labels Dec 22, 2020
tweepy/api.py Outdated Show resolved Hide resolved
Co-authored-by: Harmon <Harmon758@gmail.com>
@Harmon758 Harmon758 removed the Need Follow-Up This needs to be followed up on to be actionable label Dec 22, 2020
@Harmon758 Harmon758 merged commit e479270 into tweepy:master Dec 22, 2020
@Harmon758 Harmon758 added this to the 3.10 milestone Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is regarding a bug with the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileNotFoundError in api.media_upload using the file argument
5 participants