python273 / telegraph

Telegraph API wrapper | Telegra.ph
https://pypi.org/project/telegraph/
MIT License
287 stars 43 forks source link

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #36

Closed Ppang0405 closed 2 years ago

Ppang0405 commented 3 years ago

from telegraph import upload_file

Resource: https://python-telegraph.readthedocs.io/en/latest/_modules/telegraph/upload.html#upload_file

I use upload_file func but when I pass file_name or whatever file object ( by: with open(file_path, 'rb') as f: list_src = upload_file(f) ), Error json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) throw.