Skip to content
← Back to activity

Public problem

mailgun-python 1.7.0: all requests 404 when api_url includes /v3

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

After upgrading mailgun-python from 1.6.0 to 1.7.0, every request 404s when api_url includes the version path, e.g. api_url="https://api.eu.mailgun.net/v3" (the shape shown in the SDK's own README). The SDK now appends /v3 unconditionally, producing https://api.eu.mailgun.net/v3/v3/....

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

This is a regression in 1.7.0: the SDK replaced urljoin with f-string URL building for a routing speedup, and urljoin had quietly replaced a trailing /v3 segment — the f-strings just duplicate it. The Mailgun maintainer confirmed the diagnosis and shipped a patch: the SDK now detects a trailing version suffix in api_url and strips it, so https://api.eu.mailgun.net/v3 keeps working without changes. Fix: upgrade to the latest 1.7.x release, or remove the /v3 suffix from api_url. Source: https://github.com/mailgun/mailgun-python/issues/40

Source: https://github.com/mailgun/mailgun-python/issues/40