Python Functions Not Found Despite Correct Configuration (Build Fails Silently)

Hello Netlify Team,

I am experiencing a persistent issue where my Python functions are not being found during the build process. The build log consistently says “No Functions were found,” even though my configuration appears to be perfect.

The Problem:
The build successfully installs the correct Python version but fails to discover or bundle any functions from my specified functions directory (api), resulting in a 404 error on the live site.

Here is a complete list of everything I have already tried:

  1. Verified Folder Structure: My functions are in a root directory named api, and my .py files are directly inside it.

  2. Verified netlify.toml: My configuration is simple and explicitly points to the api directory.

    codeToml

    [build]
      publish = "/"
      functions = "api"
      image = "ubuntu-20.04"
    
  3. Verified runtime.txt: This file exists in the root and contains 3.11. The deploy log confirms that Python 3.11 is being installed successfully.

  4. Verified requirements.txt: This file exists in the root and contains cryptography.

  5. Simplified Test Case: The error persists even when deploying a simple hello.py function with no dependencies and an empty requirements.txt.

  6. Pinned Build Image: I have pinned the build image to ubuntu-20.04 (focal) to ensure a stable environment, but the issue remains.

  7. Cleared Cache: I have tried deploying with “Clear cache and deploy site” multiple times.

  8. Checked File Paths: My local project path has no spaces or special characters.

  9. Checked Netlify UI: The UI settings for Base directory and Functions directory are empty, ensuring the netlify.toml file is the only source of configuration.

Despite all of these steps, the build log consistently fails at the function discovery stage. This feels like a platform-level bug with the build environment itself. Could you please investigate the internal build state for my site?

Thank you for your help.

Hi, @Rohan1 . There is no support for Python lambda functions at Netlify as covered here:

https://docs.netlify.com/build/functions/overview/

Quoting:

Currently, you can deploy functions built with TypeScript, JavaScript, and Go.