Closed cjezzerc closed 2 years ago
Thanks for finding this and adding the fix!
Thanks for responding so quickly.
Regards
Jeremy
On Tue, May 24, 2022 at 1:07 PM Rory Davidson @.***> wrote:
Thanks for finding this and adding the fix!
— Reply to this email directly, view it on GitHub https://github.com/IHTSDO/SNOMED-in-5-minutes/pull/24#issuecomment-1135833509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX5KOJVB6LBBSKXRJYMU3SDVLTBB3ANCNFSM5WZH5ESA . You are receiving this because you authored the thread.Message ID: @.***>
The file python3-examples/example.py was generating this error
I traced it first to the fact that the response received was not valid json, but was an html page saying my IP was blocked.
As access via web browser still worked, I tried curl and that also worked.
So I checked the request header curl was sending and tried setting User-Agent in the header python was sending and that seemed to cure it.
I have added a function "url_open_with_header" which replaces the calls to the plain "urlopen" in the main body.
The output is now: