import pywikibot
from pywikibot import pagegenerators as pg

site = pywikibot.Site("commons", 'commons')
catname = "Media contributed by RAÄ: needing categorisation (no exact match)"
print(catname)
cat = pywikibot.Category(site, catname)
gen = pg.CategorizedPageGenerator(cat)

for g in gen:
    print(g)
Media contributed by RAÄ: needing categorisation (no exact match)
ERROR: Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 743, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5acff60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5acff60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/pwb/pywikibot/data/api.py", line 1957, in submit
    body=body, headers=headers)
  File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1458, in wrapper
    return obj(*__args, **__kw)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 322, in request
    r = fetch(baseuri, method, params, body, headers, **kwargs)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 511, in fetch
    error_handling_callback(request)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 398, in error_handling_callback
    raise request.data
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 377, in _http_process
    verify=not ignore_validation)
  File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5acff60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

WARNING: Waiting 5 seconds before retrying.
ERROR: Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 743, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5acfef0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5acfef0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/pwb/pywikibot/data/api.py", line 1957, in submit
    body=body, headers=headers)
  File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1458, in wrapper
    return obj(*__args, **__kw)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 322, in request
    r = fetch(baseuri, method, params, body, headers, **kwargs)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 511, in fetch
    error_handling_callback(request)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 398, in error_handling_callback
    raise request.data
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 377, in _http_process
    verify=not ignore_validation)
  File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5acfef0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

WARNING: Waiting 10 seconds before retrying.
ERROR: Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.6/socket.py", line 743, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5ad50b8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/srv/paws/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/srv/paws/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5ad50b8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/paws/pwb/pywikibot/data/api.py", line 1957, in submit
    body=body, headers=headers)
  File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1458, in wrapper
    return obj(*__args, **__kw)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 322, in request
    r = fetch(baseuri, method, params, body, headers, **kwargs)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 511, in fetch
    error_handling_callback(request)
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 398, in error_handling_callback
    raise request.data
  File "/srv/paws/pwb/pywikibot/comms/http.py", line 377, in _http_process
    verify=not ignore_validation)
  File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/srv/paws/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/srv/paws/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='commons.wikimedia.org', port=443): Max retries exceeded with url: /w/api.php (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f13a5ad50b8>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))

WARNING: Waiting 20 seconds before retrying.
ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.


KeyboardInterrupt