Skip to content

Connection issues when trying to download by URL #238

@chrisl64squares

Description

@chrisl64squares

I am using xword-dl extensively and without issues for downloading puzzles from established outlets using their keyword (thank you, btw, for creating and maintaining this outstanding tool!).

However, attempting to download by URL consistently fails due to some kind of connection error. I searched around for info about the errors (as I could figure them out; I toy with code but am not a programmer) and it seems like it might be an error specific to some OSX installations and settings, but none of the fixes that seemed potentially relevant helped.

At any rate, following are my system info and the error I receive using the example puzzle URL from this repository's README file. Please let me know what else I can share that might help, and thanks in advance for your suggestions!

System info

  • M3 MacBook Air
  • macOS 15.5 (24F74)
  • xword-dl 2025.5.8
  • Python 3.13.3
  • pip 25.1.1

I am running xword-dl in a virtual env as recommended.

Because it seems to be mentioned a lot in the context of this error, my hosts file (btw, this error occurs on every network I've used at home, work, and coffeeshop):

127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost

My hostname is set properly, I believe:

xword-dl_env ❯ scutil --get HostName
localhost

Error message:

xword-dl_env ❯ xword-dl https://rosswordpuzzles.com/2021/01/03/cover-up/
Traceback (most recent call last):
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
        (self._dns_host, self.port),
    ...<2 lines>...
        socket_options=self.socket_options,
    )
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
               ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.3_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/socket.py", line 977, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno 8] nodename nor servname provided, or not known

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
        conn,
    ...<10 lines>...
        **response_kw,
    )
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connectionpool.py", line 488, in _make_request
    raise new_e
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connectionpool.py", line 464, in _make_request
    self._validate_conn(conn)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connectionpool.py", line 1093, in _validate_conn
    conn.connect()
    ~~~~~~~~~~~~^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connection.py", line 704, in connect
    self.sock = sock = self._new_conn()
                       ~~~~~~~~~~~~~~^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connection.py", line 205, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x10541f610>: Failed to resolve 'pagead2.googlesyndication.com' ([Errno 8] nodename nor servname provided, or not known)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
        method=request.method,
    ...<9 lines>...
        chunked=chunked,
    )
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
        method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
    )
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pagead2.googlesyndication.com', port=443): Max retries exceeded with url: /pagead/js/adsbygoogle.js (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x10541f610>: Failed to resolve 'pagead2.googlesyndication.com' ([Errno 8] nodename nor servname provided, or not known)"))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/bin/xword-dl", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/xword_dl/xword_dl.py", line 259, in main
    puzzle, filename = by_url(args.source, **options)
                       ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/xword_dl/xword_dl.py", line 67, in by_url
    dl, puzzle_url = parse_for_embedded_puzzle(url, **kwargs)
                     ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/xword_dl/xword_dl.py", line 108, in parse_for_embedded_puzzle
    res = requests.get(js_url, headers={'User-Agent':'xword-dl'})
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/Users/chris/Library/CloudStorage/Dropbox/word-puzzles/crosswords-acrostics/xword-dl_env/lib/python3.13/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='pagead2.googlesyndication.com', port=443): Max retries exceeded with url: /pagead/js/adsbygoogle.js (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x10541f610>: Failed to resolve 'pagead2.googlesyndication.com' ([Errno 8] nodename nor servname provided, or not known)"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions