question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Submitting images using `submit_image` fails with a 400 client error.

See original GitHub issue

Describe Bug Whenever the submit_image method is called on a subreddit object, I get a 400 client error. This has been going on for about a week and I was able to successfully submit images with it until March 3rd. Since then I have not been able to submit any images without getting a 400 client error. I had encountered some websocket timeouts but that was an error with the network on my end that I resolved.

To Reproduce Steps to reproduce the behavior:

  1. create reddit instance
  2. run subreddit.submit_image on any subreddit

Expected behavior The post to be submitted with the i.redd.it image service.

System Info

  • OS: MacOS 10.15 & Ubuntu 19.10
  • Python: 3.7.6 (mac) & 3.7.5 (ubuntu)
  • PRAW Version: 6.5.1 (both)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jarhill0commented, Mar 13, 2020

Just chiming in to say that client-side checks for server-side validation that may change on the server side is probably not a great strategy. It’s inflexible and can get out of sync.

0reactions
PythonCoderAScommented, Mar 14, 2020

@bboe XML is returned.

<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>EntityTooLarge</Code>
<Message>Your proposed upload exceeds the maximum allowed size</Message><ProposedSize>20971528</ProposedSize>
<MaxSizeAllowed>20971520</MaxSizeAllowed><RequestId>23F056D6990D87E0</RequestId>
<HostId>iYEVOuRfbLiKwMgHt2ewqQRIm0NWL79uiC2rPLj9P0PwW554MhjY2/O8d9JdKTf1iwzLjwWMnGQ=</HostId>
</Error>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Self Hosted: Error 400 on image upload. · Issue #1917 - GitHub
Everything seems to work except uploading images which result in the above error. I have matched everything I can to the docker configuration....
Read more >
Canvas File Upload 400 Error: Request failed with status code ...
I've checked my archives list. And it says 103% so I removed some sent files from the list. And it came up as...
Read more >
How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 Bad Request error indicates that the server cannot or process the request due to a client error. Read about the common...
Read more >
Not able to submit image with POST method using jmeter
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request ......
Read more >
400 Bad Request - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found