emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.09k stars 72 forks source link

Error on running bloggy auth #457

Closed aerunti closed 1 year ago

aerunti commented 1 year ago

When I try to run bloggy example in version 2.5.1, and go to auth/login, I got the following error:

image

I tried to run bloggy because when I followed the docs and tried to run auth/login, I got the same error.

So I tried other versions, it runs with 2.4.14.

So the new versions (2.5.0 and 2.5.1) introduced a bug on

auth_routes = auth.module(__name__)

or need a (undocumented) configuration.

any tips are welcome to run on new versions.

gi0baro commented 1 year ago

@aerunti there was a contextvars.Context issue with granian 0.4.0, which has been fixed in 0.4.1 (ref: https://github.com/emmett-framework/granian/releases/tag/v0.4.1).

Upgrading dependencies should fix it.

aerunti commented 1 year ago

@aerunti there was a contextvars.Context issue with granian 0.4.0, which has been fixed in 0.4.1 (ref: https://github.com/emmett-framework/granian/releases/tag/v0.4.1).

Upgrading dependencies should fix it.

unfortunately, it didn't solve it. Granian 0.4.1 is installed and problem persists. Looks the form isn't generated or some string for translation need be configurated.

There is a command to generate a (updated) en.json with all strings to be moved to other language name, like pt.json or es.json and translated? My language folder is empty.

gi0baro commented 1 year ago

@aerunti I just checked locally and you're right. But it's not an issue with translator, actually something is wrong with the context. Until I release a fix, sticking with Emmett 2.5.0 (granian 0.3) should work.

gi0baro commented 1 year ago

This is now fixed with granian 0.4.2