Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frozen-Flask is not compatible with Werkzeug 3.0.0 #129

Closed
kris524 opened this issue Oct 2, 2023 · 3 comments · Fixed by #132
Closed

Frozen-Flask is not compatible with Werkzeug 3.0.0 #129

kris524 opened this issue Oct 2, 2023 · 3 comments · Fixed by #132

Comments

@kris524
Copy link

kris524 commented Oct 2, 2023

I was using freeze.freeze() and I got the following issue: AttributeError: 'Map' object has no attribute 'charset'
After looking at the Werkzeug documentation, I saw that charset has been deprecated.

@paulocoutinhox
Copy link

Hi,

I have the same error:

12:54:26.076 | Traceback (most recent call last):
-- | --
12:54:26.076 | File "kaktos.py", line 6, in <module>
12:54:26.077 | system.process_command()
12:54:26.077 | File "/opt/buildhome/repo/modules/system.py", line 121, in process_command
12:54:26.077 | run(command_params)
12:54:26.077 | File "/opt/buildhome/repo/modules/commands/build.py", line 12, in run
12:54:26.077 | system.build_pages()
12:54:26.078 | File "/opt/buildhome/repo/modules/system.py", line 82, in build_pages
12:54:26.078 | freezer_app.freeze()
12:54:26.078 | File "/opt/buildhome/.asdf/installs/python/3.8.18/lib/python3.8/site-packages/flask_frozen/__init__.py", line 205, in freeze
12:54:26.078 | return set(page.url for page in self.freeze_yield())
12:54:26.078 | File "/opt/buildhome/.asdf/installs/python/3.8.18/lib/python3.8/site-packages/flask_frozen/__init__.py", line 205, in <genexpr>
12:54:26.078 | return set(page.url for page in self.freeze_yield())
12:54:26.079 | File "/opt/buildhome/.asdf/installs/python/3.8.18/lib/python3.8/site-packages/flask_frozen/__init__.py", line 183, in freeze_yield
12:54:26.079 | for url, endpoint, last_modified in self._generate_all_urls():
12:54:26.079 | File "/opt/buildhome/.asdf/installs/python/3.8.18/lib/python3.8/site-packages/flask_frozen/__init__.py", line 232, in _generate_all_urls
12:54:26.079 | url_encoding = self.app.url_map.charset
12:54:26.079 | AttributeError: 'Map' object has no attribute 'charset'

In my project:

https://github.com/paulocoutinhox/kaktos

brentvollebregt added a commit to brentvollebregt/nitratine.net that referenced this issue Oct 4, 2023
@paulocoutinhox
Copy link

This project is dead? Nobody answer.

I think that use w version 2 will cause other problem, because Flask3 was released:

3:21:56 PM: ERROR: flask 3.0.0 has requirement Werkzeug>=3.0.0, but you"ll have werkzeug 2.3.7 which is incompatible.
Installing collected packages: libsass, click, MarkupSafe, Jinja2, zipp, importlib-metadata, itsdangerous, werkzeug, blinker, flask, frozen-flask, six, tornado, livereload, ply, calmjs.parse, python-dotenv, dukpy, jmespath, urllib3, python-dateutil, botocore, s3transfer, boto3, colorama, pygemstones

@honzajavorek
Copy link
Contributor

 This project is dead?

Short version, mostly yes. Long version here.

Even if it wasn't dead, it's quite normal for the ecosystem of voluntarily maintained extensions to catch up slowly when a major breaking version of the main project gets released. New Flask is out for only 6 days. People have lives.

Please pin your dependencies to werkzeug < 3 until this gets resolved. There is already a Pull Request kick off in #130, which I think is quite nice for a project as dead as this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants