Skip to content

Wrangler version parse issue with Python Workers #290

Closed

Description

@dosisod

I am getting a wrangler version error on a fresh setup of Python Workers. The issue is that pywrangler is not parsing the version correctly: It sees the package.json version first, then the installed version of wrangler:

$ npx wrangler --version
npm notice run wandering-cake-1e21@0.0.0 npx
npm notice run 'wrangler' --version

 ⛅️ wrangler 4.148.0
────────────────────


$ uv run pywrangler dev
...
ERROR    wrangler version at least 4.127.1 required, have 0.0.0.
ERROR    Update wrangler with: npm install wrangler@latest

As you can see, the project, wandering-cake-1e21, has a default version of 0.0.0. This is causing the wrangler CLI to pick up on this first, instead of the actual version number. I can fix this temporarily by making my library package the same as wrangler (4.148.0).

This was probably introduced by #45.

Solution

It looks like --silent would fix this:

$ npx wrangler --version
npm notice run wandering-cake-1e21@0.0.0 npx
npm notice run 'wrangler' --version

 ⛅️ wrangler 4.148.0
────────────────────

$ npx --silent wrangler --version

 ⛅️ wrangler 4.148.0
────────────────────

Full MVP

$ mkdir /tmp/demo-app && cd /tmp/demo-app

$ uvx --from workers-py pywrangler init
...

$ cd wandering-cake-1e21/

$ uv run pywrangler dev
Using CPython 3.12.10
Creating virtual environment at: .venv
Installed 10 packages in 47ms
Using CPython 3.14.7 interpreter at: /usr/bin/python3.14
Creating virtual environment at: .venv-workers
Activate with: source .venv-workers/bin/activate
Using CPython 3.14.2
Creating virtual environment at: .venv-workers/pyodide-venv
Activate with: source .venv-workers/pyodide-venv/bin/activate
INFO     Resolved 1 requirements from /tmp/demo-app/wandering-cake-1e21/pylock.toml.
INFO     Installing packages into python_modules...
INFO     Packages installed in python_modules.
INFO     Installing packages into .venv-workers...
INFO     Packages installed in .venv-workers.
ERROR    wrangler version at least 4.127.1 required, have 0.0.0.
ERROR    Update wrangler with: npm install wrangler@latest

$ uv run pywrangler --version
pywrangler, version 1.17.7

$ uv run wrangler --version

 ⛅️ wrangler 4.148.0
────────────────────

$ grep version package.json
  "version": "0.0.0",

# Open editor, replace version with "4.148.0"

$ uv run pywrangler dev
INFO     Passing command to npx wrangler: npx --yes wrangler dev
npm notice run wandering-cake-1e21@4.148.0 npx
npm notice run 'wrangler' dev

 ⛅️ wrangler 4.148.0
────────────────────
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│  [b] open a browser [d] open devtools [e] open local explorer [t] start tunnel [c] clear console [x] to exit  │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Attaching additional modules:
┌────────────────────┬────────┬────────────┐
│ Name               │ Type   │ Size       │
├────────────────────┼────────┼────────────┤
│ submodule.py       │ python │ 0.05 KiB   │
├────────────────────┼────────┼────────────┤
│ Vendored Modules   │        │ 107.52 KiB │
├────────────────────┼────────┼────────────┤
│ Total (31 modules) │        │ 107.57 KiB │
└────────────────────┴────────┴────────────┘
⎔ Starting local server...
[wrangler:info] Ready on http://localhost:8787

Activity

  1. ryanking13 commented on Oct 12, 2026

    @ryanking13
    Contributor

    Thanks for the report!

    #291 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions