Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in function #93

Open
Amarnath-someperson opened this issue Aug 30, 2024 · 0 comments
Open

TypeError in function #93

Amarnath-someperson opened this issue Aug 30, 2024 · 0 comments

Comments

@Amarnath-someperson
Copy link

Amarnath-someperson commented Aug 30, 2024

In flask_bcrypt.py, I noticed a TypeError in (commit d906452) function Bcrypt.generate_password_hash() as:

TypeError: gensalt() got an unexpected keyword argument 'rounds'

Complete error

Traceback (most recent call last):
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask/app.py", line 1498, in __call__
    return self.wsgi_app(environ, start_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask/app.py", line 1476, in wsgi_app
    response = self.handle_exception(e)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/urmom/python/school-flask/app.py", line 116, in admin_login
    pwhash = bcrypt.generate_password_hash(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/amarnathk/.local/lib/python3.12/site-packages/flask_bcrypt.py", line 199, in generate_password_hash
    salt = bcrypt.gensalt(rounds=rounds, prefix=prefix)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: gensalt() got an unexpected keyword argument 'rounds'

As far as I know, bcrypt.gensalt(rounds=rounds, prefix=prefix) should be bcrypt.gensalt(log_rounds=rounds, prefix=prefix).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant