0

I'd encountered a strange problem when using urllib.request.urlopen function. When I call the function without given the timeout parameter, it just freeze forever (or really really long time), but once I provide the timeout parameter, eg. timeout = 1, the function just return exactly after the interval of timeout without any problem.

As shown in the gif below. (I was using Ipython prompt)

screen record scene of the problem

1 Answer 1

1

Well, I found that is an IPv6 problem, after disabled it, everything became fine back.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.