TypeError: code() takes at least 14 arguments (13 given)
1.7.20210509 on Debian Bullseye amd64
Summary On first HTTP request returns HTTP 500 error. Log shows an error. Unable to create database.
Steps to reproduce
Install on Debian Bullseye and replacing Debian's werkzeug 1.0.0
with pip3
version 0.15.0
due to issue #290 (closed)
What is the current bug behavior? HTTP server fails
What is the expected correct behavior? Not to fail!
Relevant logs and/or screenshots
# tail /var/log/flectra/flectra-server.log rule.bind(self)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/routing.py", line 710, in bind self.compile()
File "/usr/local/lib/python3.9/dist-packages/werkzeug/routing.py", line 766, in compile self._build = self._compile_builder(False)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/routing.py", line 1129, in _compile_builder return self.BuilderCompiler(self).compile(append_unknown)
File "/usr/local/lib/python3.9/dist-packages/werkzeug/routing.py", line 1120, in compile co = types.CodeType(*code_args)
TypeError: code() takes at least 14 arguments (13 given) - - -
Possible fixes
This is reported against several other projects and is another result of relying on a pre v1.0 release of werkzeug
because it reworked its API substantially in the earlier versions. Mentioned here with a comment at the end that this, and another bug, are fixed by installing version 0.15.51
https://github.com/pallets/werkzeug/issues/1579
After pip3 install werkzeug==0.15.5
and systemctl restart flectra
HTTP service answers correctly and is awaiting Database creation.