cloudflare / python-worker-hello-world

Python hello world for Cloudflare Workers
Apache License 2.0
276 stars 48 forks source link

Examples don't work #16

Open skorokithakis opened 2 years ago

skorokithakis commented 2 years ago

I'm trying to get started with Python workers, but the fact that the example doesn't work is not very encouraging:

23:06:53 $ wrangler generate my-python-project https://github.com/cloudflare/python-worker-hello-world

✘ [ERROR] Deprecation:

  `wrangler generate` has been deprecated.
  Try running `wrangler init` to generate a basic Worker, or cloning the template repository
  instead:

  git clone https://github.com/cloudflare/python-worker-hello-world

  Please refer to https://developers.cloudflare.com/workers/wrangler/deprecations/#generate for more
  information.

If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose

stavros@zeus:/tmp 
23:06:54 $ git clone https://github.com/cloudflare/python-worker-hello-world
Cloning into 'python-worker-hello-world'...
Resolving deltas: 100% (39/39), done.

stavros@zeus:/tmp 
23:07:03 $ cd python-worker-hello-world/

stavros@zeus:/t/python-worker-hello-world (master|✔) 
23:07:10 $ wrangler publish
 ⛅️ wrangler 2.0.12 
--------------------
▲ [WARNING] Processing wrangler.toml configuration:

    - 😶 Ignored: "type":
      Most common features now work out of the box with wrangler, including modules, jsx,
  typescript, etc. If you need anything more, use a custom build.
    - 😶 Ignored: "webpack_config":
      Most common features now work out of the box with wrangler, including modules, jsx,
  typescript, etc. If you need anything more, use a custom build.
    - Deprecation: "zone_id":
      This is unnecessary since we can deduce this from routes directly.

✘ [ERROR] Processing wrangler.toml configuration:

    - Expected "route" to be either a string, or an object with shape { pattern, custom_domain,
  zone_id | zone_name }, but got "".

If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose
koeninger commented 2 years ago

Can you raise this issue on the wrangler2 repo?

In the meantime, wrangler 1 can still be installed using cargo or manually https://developers.cloudflare.com/workers/wrangler/cli-wrangler/install-update/#manual-install https://github.com/cloudflare/wrangler/releases/tag/v1.19.12

skorokithakis commented 2 years ago

Oh excellent, thanks! I prefer Rust to JS, hopefully Wrangler 1 still works fine.