Skip to main content
Solved

Why does python request return HTTP status 500 and urllib does not


I want to use python request library to run webhoooks on FME Server. I am having trouble because python request library returns HTTP status code 500 with server error:

Thu-23-Jul-2020 10:21:35.970 AM FATAL http-nio-80-exec-6 412007 : Service failed: java.nio.file.AccessDeniedException: C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\requestdata\\9058908488982796417

 

I try to use the same url and headers with urllib.request.urlopen and the webhook runs fine. I really need to use the request library.

Best answer by garydlester

I had some help and we finally figured it out, I needed to have some value in the reader parameter and also I had to open up some permissions for the webhook token through token manager even though I assigned the permissions to the token when I created the webhook. I think there may be something buggy about my install of FME Server but it is working now, thanks for the response.

View original
Did this help you find an answer to your question?

2 replies

david_r
Evangelist
  • July 27, 2020

The http status codes are returned by the server, not the Python modules. So one probably cause is that urllib and requests are doing something slightly differently, which the server doesn't know how to handle.

My recommendation would be to use something like Fiddler to check the communication using both requests and urllib, to see if if there are any differences in e.g. the headers.


  • Author
  • Best Answer
  • July 27, 2020

I had some help and we finally figured it out, I needed to have some value in the reader parameter and also I had to open up some permissions for the webhook token through token manager even though I assigned the permissions to the token when I created the webhook. I think there may be something buggy about my install of FME Server but it is working now, thanks for the response.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings