duckdb issue using latest cli (50.1.3)

I have a Python project making use of duckdb. The app built successsfully with cli 48.2.9 on October 23rd, but now with cli 50.1.3 it generates a ModuleNotFoundError: No module named 'duckdb.duckdb'. What could have changed between these 2 cli versions?

I am deploying via Git integration. I am using requirements.txt which has duckdb pinned to 1.3.2. I am using import duckdb in my code, but in turn this calls from duckdb.duckdb import. I wouldn’t expect the same codebase to generate different outputs based on an updated vercel cli.

The build logs are not very verbose, they just say:
Vercel CLI 50.1.3
WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: Error List
No Python version specified in pyproject.toml or Pipfile.lock. Using latest installed version: 3.12
Creating virtual environment at “/vercel/path0/.vercel/python/.venv”…
Using uv at “/usr/local/bin/uv”
Installing required dependencies from requirements.txt with uv…
Build Completed in /vercel/output [7s]

Similar to:

Running “vercel build”
Vercel CLI 48.2.9
WARN! Due to builds existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
No Python version specified in pyproject.toml or Pipfile.lock. Using latest installed version: 3.12
Installing required dependencies from requirements.txt…
Using uv at “/usr/local/bin/uv”
Build Completed in /vercel/output [2s]

The support chat didn’t help. Any hint/suggestion would be much appreciated. Thanks!

(sorry for the delay here, coming back after holidays)

The team is actively investigating this, in the meantime you can roll back to Vercel CLI <50 to unblock builds

I wouldn’t expect the same codebase to generate different outputs based on an updated vercel cli.

The vercel CLI is actually almost entirely responsible for building the codebase, when we update the builders they come in the form of updates to the CLI, which allows you to pin build processes by pinning CLI versions. In v50, dependency management for python was standardized to use uv.

There have been a few other reports of similar ModuleNotFoundError issues caused by this and the team will ship an update in a new patch once it’s fixed

One known cause of this issue is a .python-version file which uv will read and can potentially cause it to install deps for a python version that doesn’t match runtime. The only valid Python version right now is 3.12

The .python-version were disregarded prior to CLI v50. Can you confirm whether you have one of these and if removing it fixes the issue?

1 Like

Hi Jacob,

Many thanks for your reply. There was indeed an issue with a `.python-version` file that specified 3.13. It must have been ignored when uv wasn’t used. I have now removed it.

Thanks again.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.