Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Urllib error
#4
Hello all,

Here is the function

def url_check(array):
    url=array[0]
    table_name=array[1]
    try:
        rc = urllib.request.urlopen(url, timeout=10).read().decode('utf-8')
    except (HTTPError,URLError) as e:
        print("URL unreachable")
    except timeout:
        print("URL unreachable")
I need a way to handle the exception -> "ConnectionResetError: [Errno 104] Connection reset by peer."
The above code is not able to handle this exception "ConnectionResetError: [Errno 104] Connection reset by peer"
Reply


Messages In This Thread
Urllib error - by wintenrod - Sep-11-2020, 08:55 AM
RE: Urllib error - by wintenrod - Sep-11-2020, 10:26 AM
RE: Urllib error - by Larz60+ - Sep-11-2020, 04:40 PM
RE: Urllib error - by wintenrod - Sep-14-2020, 06:18 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Connectivity issue with urllib ronen1m 7 4,896 Nov-22-2018, 01:03 PM
Last Post: ronen1m

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020