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

Upgrade Werkzeug's version 0.15.4 to 0.15.5 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kogoon
Copy link

@Kogoon Kogoon commented Aug 18, 2022

Issue #, if available:

Description of changes:
Environment : Amazon Linux 2, python3.8.10

I tried to run python code session-store
Some error comes out

Traceback (most recent call last):
  File "/home/ec2-user/workspace/session-test/venv/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 906, in main
    cli.main(args=args, prog_name=name)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 569, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 779, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 300, in __init__
    self._load_unlocked()
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 324, in _load_unlocked
    self._app = rv = self.loader()
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 385, in load_app
    app = locate_app(self, import_name, None,
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/cli.py", line 236, in locate_app
    __import__(module_name)
  File "/home/ec2-user/workspace/session-test/app.py", line 5, in <module>
    app = Flask(__name__)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/app.py", line 559, in __init__
    self.add_url_rule(
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/app.py", line 67, in wrapper_func
    return f(self, *args, **kwargs)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/flask/app.py", line 1217, in add_url_rule
    self.url_map.add(rule)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 1388, in add
    rule.bind(self)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 730, in bind
    self.compile()
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 794, in compile
    self._build = self._compile_builder(False).__get__(self, None)
  File "/home/ec2-user/workspace/session-test/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 951, in _compile_builder
    code = compile(module, "<werkzeug routing>", "exec")
TypeError: required field "type_ignores" missing from Module

I modified Werkzeug version 0.15.4 to 0.15.5, and then work.

Thanks.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@triggan
Copy link
Contributor

triggan commented Aug 18, 2022

This seems to be a dependency based on the use of Python 3.8. This still works fine, as-is, using Python 3.7 (which is still the default version of Python installed with Amazon Linux 2). Likely some other things that we need to consider before moving this to Python 3.8 (including updating the instructions for this hands-on exercise to use Python 3.8). Will leave this open for the time being.

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 this pull request may close these issues.

2 participants