Bug 2224708 - TypeError: LoginForm.validate() got an unexpected keyword argument 'extra_validators'
Summary: TypeError: LoginForm.validate() got an unexpected keyword argument 'extra_val...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: pgadmin4
Version: 38
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Sandro Mani
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-22 10:23 UTC by Joseph D. Wagner
Modified: 2023-08-15 21:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-15 21:11:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joseph D. Wagner 2023-07-22 10:23:38 UTC
Attempting to login results in an error displayed on the webpage.

Detailed error output:
ERROR	pgadmin:	LoginForm.validate() got an unexpected keyword argument 'extra_validators'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/pgadmin4/pgadmin/authenticate/__init__.py", line 118, in login
    if not auth_obj.validate():
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/pgadmin4/pgadmin/authenticate/__init__.py", line 245, in validate
    status, err_msg = source.validate(self.form)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/pgadmin4/pgadmin/authenticate/internal.py", line 104, in validate
    submit = form.validate_on_submit()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/flask_wtf/form.py", line 86, in validate_on_submit
    return self.is_submitted() and self.validate(extra_validators=extra_validators)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: LoginForm.validate() got an unexpected keyword argument 'extra_validators'




Reproducible: Always

Steps to Reproduce:
1. Enter login credentials
2. Redirected to this error.
Actual Results:  
{"success":0,"errormsg":"LoginForm.validate() got an unexpected keyword argument 'extra_validators'","info":"","result":null,"data":null}

Expected Results:  
Working webapp.

Comment 1 Sandro Mani 2023-08-15 21:11:50 UTC
This looks like flask_wtf running against an incompatible version for wtforms (validate a method of wtforms.Form).

Closing as most likely a problem with your environment and not related to pgadmin4. Please ensure you are using the system packages for python-flask-wtf-1.1.1 and python-wtforms-3.0.1.


Note You need to log in before you can comment on or make changes to this bug.