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

im not able to create a admin cannot bcrypt this password is saying #102

Open
sakthiRatnam opened this issue Feb 9, 2022 · 1 comment
Open

Comments

@sakthiRatnam
Copy link

mainapp | await instance.save(using_db=db, force_create=True)
mainapp | File "/usr/local/lib/python3.9/site-packages/tortoise/models.py", line 927, in save
mainapp | await self._pre_save(db, update_fields)
mainapp | File "/usr/local/lib/python3.9/site-packages/tortoise/models.py", line 875, in _pre_save
mainapp | await asyncio.gather(*listeners)
mainapp | File "/usr/local/lib/python3.9/site-packages/fastapi_admin/providers/login.py", line 78, in pre_save_admin
mainapp | instance.password = hash_password(instance.password)
mainapp | File "/usr/local/lib/python3.9/site-packages/fastapi_admin/utils.py", line 23, in hash_password
mainapp | return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
mainapp | AttributeError: 'str' object has no attribute 'decode'

@sakthiRatnam sakthiRatnam changed the title im not able to create a admin cannto bcrypt this password is saying im not able to create a admin cannot bcrypt this password is saying Feb 9, 2022
@sakthiRathinam
Copy link

i have created pull request for this issue kindly check out the pr and merge

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

2 participants