Unable to Connect to IMAP Server from HxGN Python Studio (Timeout / OS Error)

We are facing issues while trying to access an IMAP mailbox from HxGN Python Studio. The Python script uses standard IMAP libraries (imaplib) to connect and authenticate, but the connection consistently fails with OS-related errors, timeouts, and server unreachable messages.

The same IMAP credentials and host configuration work successfully in external Python environments (like VS Code or local Python installation). Hence, the issue appears specific to the HxGN Python Studio runtime or environment restrictions.

Steps to Reproduce:

  1. Open HxGN Python Studio.

  2. Run the following test script:
    import imaplib

    IMAP_HOST = “imap.example.com”
    IMAP_PORT = 993
    username = “user@example.com”
    password = “app_password”

    imap = imaplib.IMAP4_SSL(IMAP_HOST, IMAP_PORT, timeout=20)
    imap.login(username, password)
    print(“:white_check_mark: Connected successfully!”)

    Observed Behavior:

    • Connection fails with one of the following errors:

      • OSError: [Errno 110] Connection timed out

      • Server unreachable

      • TimeoutError

    • No successful connection or authentication occurs.


    Expected Behavior:

    The script should connect to the IMAP server securely via port 993 and authenticate using the provided credentials, similar to how it functions in a local Python environment.

appears specific to the HxGN Python Studio runtime or environment restrictions.

Indeed! And something with which we, the Jupyter community, are unlikely to be able to help debug. They do, however, list some support avenues, but alas, nothing publicly searchable.

1 Like