Werkzeug: 3.8 nightly error: TypeError: code() takes at least 14 arguments (13 given)

Created on 1 Jun 2019  ·  4Comments  ·  Source: pallets/werkzeug

For a project of mine, I run Travis CI with 3.5, 3.6, 3.7, and nightly. Only nightly is failing with the following error:

platform linux -- Python 3.8.0a4+, pytest-4.4.1, py-1.8.0, pluggy-0.9.0 -- /home/travis/virtualenv/python3.8-dev/bin/python

    app = Flask(__name__)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/flask/app.py:558: in __init__
    self.add_url_rule(
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/flask/app.py:66: in wrapper_func
    return f(self, *args, **kwargs)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/flask/app.py:1216: in add_url_rule
    self.url_map.add(rule)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:1562: in add
    rule.bind(self)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:711: in bind
    self.compile()
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:767: in compile
    self._build = self._compile_builder(False)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:1128: in _compile_builder
    return self.BuilderCompiler(self).compile(append_unknown)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:1119: in compile
    co = types.CodeType(*code_args)
E   TypeError: code() takes at least 14 arguments (13 given)

Most helpful comment

I don't think we're constructing code.CodeType any more, please upgrade to the latest werkzeug

All 4 comments

@asottile

@c17r thanks for reporting, someone was seeing a 3.8 nightly failure at the sprint yesterday too. Travis’s allow_failures (just for 3.8 nightly) can be used to prevent the entire build from failing in the meantime in case this is helpful.

I don't think we're constructing code.CodeType any more, please upgrade to the latest werkzeug

I upgraded from 0.15.2 to 0.15.4 and got a new error:

    app = Flask(__name__)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/flask/app.py:559: in __init__
    self.add_url_rule(
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/flask/app.py:67: in wrapper_func
    return f(self, *args, **kwargs)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/flask/app.py:1217: in add_url_rule
    self.url_map.add(rule)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:1388: in add
    rule.bind(self)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:730: in bind
    self.compile()
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:794: in compile
    self._build = self._compile_builder(False).__get__(self, None)
../../../virtualenv/python3.8-dev/lib/python3.8/site-packages/werkzeug/routing.py:951: in _compile_builder
    code = compile(module, "<werkzeug routing>", "exec")
E   TypeError: required field "type_ignores" missing from Module

which is #1551 which y'all already fixed for 0.15.5. Good deal.

cheers, sorry for the noise!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidism picture davidism  ·  9Comments

KangOl picture KangOl  ·  16Comments

miki725 picture miki725  ·  10Comments

Nessphoro picture Nessphoro  ·  6Comments

lepture picture lepture  ·  6Comments