Advertisement
quantim

form.validate_on_submit() error

Jun 29th, 2017
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.39 KB | None | 0 0
  1. builtins.TypeError
  2. TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given
  3.  
  4. Traceback (most recent call last)
  5. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1997, in __call__
  6. return self.wsgi_app(environ, start_response)
  7. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1985, in wsgi_app
  8. response = self.handle_exception(e)
  9. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1540, in handle_exception
  10. reraise(exc_type, exc_value, tb)
  11. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
  12. raise value
  13. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1982, in wsgi_app
  14. response = self.full_dispatch_request()
  15. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1614, in full_dispatch_request
  16. rv = self.handle_user_exception(e)
  17. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1517, in handle_user_exception
  18. reraise(exc_type, exc_value, tb)
  19. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
  20. raise value
  21. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1612, in full_dispatch_request
  22. Open an interactive python shell in this framerv = self.dispatch_request()
  23. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask/app.py", line 1598, in dispatch_request
  24. return self.view_functions[rule.endpoint](**req.view_args)
  25. File "/home/ubuntu/workspace/Inventory/views.py", line 9, in signup
  26. if form.validate_on_submit():
  27. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/flask_wtf/form.py", line 101, in validate_on_submit
  28. return self.is_submitted() and self.validate()
  29. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/wtforms/form.py", line 310, in validate
  30. return super(Form, self).validate(extra)
  31. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/wtforms/form.py", line 152, in validate
  32. if not field.validate(self, extra):
  33. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/wtforms/fields/core.py", line 204, in validate
  34. stop_validation = self._run_validation_chain(form, chain)
  35. File "/home/ubuntu/workspace/Inventory/virtualenv/lib/python3.4/site-packages/wtforms/fields/core.py", line 224, in _run_validation_chain
  36. validator(form, self)
  37. TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given
  38. The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
  39. To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
  40.  
  41. You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
  42.  
  43. dump() shows all variables in the frame
  44. dump(obj) dumps all that's known about the object
  45. Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement