Skip to main content
Solved

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

  • July 25, 2020
  • 2 replies
  • 1066 views

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • 8394 replies
  • 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
  • 57 replies
  • 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.