Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Error running python server #15

Closed
RickMeasham opened this issue Jun 26, 2020 · 2 comments
Closed

Error running python server #15

RickMeasham opened this issue Jun 26, 2020 · 2 comments

Comments

@RickMeasham
Copy link

Environment:
Running Python 3.8.2 on Ubuntu 20.04 LTS (in WSL, but that doesn't matter)

Solution
You need to update werkzeug in requirements.txt to 0.15.5 where they fixed this issue: pallets/werkzeug#1551

Trace (not that you'll need it)

  File "server.py", line 16, in <module>
    app = Flask(__name__, static_url_path="")
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/venv/lib/python3.8/site-packages/flask/app.py", line 559, in __init__
    self.add_url_rule(
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/venv/lib/python3.8/site-packages/flask/app.py", line 67, in wrapper_func
    return f(self, *args, **kwargs)
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/venv/lib/python3.8/site-packages/flask/app.py", line 1217, in add_url_rule
    self.url_map.add(rule)
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 1388, in add
    rule.bind(self)
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 730, in bind
    self.compile()
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/venv/lib/python3.8/site-packages/werkzeug/routing.py", line 794, in compile
    self._build = self._compile_builder(False).__get__(self, None)
  File "/mnt/c/Users/rick/Documents/git/react-elements-card-payment/server/python/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```
@lljr
Copy link

lljr commented Jun 26, 2020

The traceback is useful because it's the same as in https://stackoverflow.com/questions/60140174/basic-flask-app-not-running-typeerror-required-field-type-ignores-missing-fr

soln: $ python3 -m pip install --upgrade werkzeug

remember to $ python3 -m pip freeze > requirements.txt

@cjavilla-stripe
Copy link
Contributor

@RickMeasham can you re-open if the solution from @lljr didn't work?

Thanks @lljr!!

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

No branches or pull requests

3 participants