Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

JSON decoding of response failed after trying client.upload_from_path() #58

Open

Description

@aldilaff

I am trying to upload this gif back to imgur using

try:
        print("Uploading image... ")
        imageURL = client.upload_from_path('hlN3NZZ.gif', config=None, anon=False)
    except ImgurClientError as e:
        print(e.error_message)
        print(e.status_code)

However I keep getting:

JSON decoding of response failed.
None

Could it be due to the large size of the gif?

Activity

  1. salty-horse commented on Apr 24, 2016

    @salty-horse

    No, it's because commit cb717fe by @khazhyk forgot to add a return, so the function always returns None :(

  2. charlieworld commented on May 6, 2016

    @charlieworld

    I got the same issue when I was using client.upload_from_path() function.

    any update for this issue ?

    ........ib/python2.7/site-packages/imgurpython/client.py", line 158, in make_request raise ImgurClientError('JSON decoding of response failed.')ImgurClientError: JSON decoding of response failed.

  3. salty-horse commented on May 6, 2016

    @salty-horse

    @charlieworld, use 1.1.7, which is the version on PyPI.

  4. charlieworld commented on May 8, 2016

    @charlieworld

    @salty-horse thanks a lot !

    I fount out the problem I got is that the photo I upload was too large...... (24mb)

    When I using the small image file to test it, it work !

    I think I need to write another code to check the file before upload.......

  5. added a commit that references this issue on Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions