Bug 2224708

Summary: TypeError: LoginForm.validate() got an unexpected keyword argument 'extra_validators'
Product: [Fedora] Fedora Reporter: Joseph D. Wagner <joe>
Component: pgadmin4Assignee: Sandro Mani <manisandro>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 38CC: manisandro
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-15 21:11:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.