# passlib with bcrypt 4.x: '(trapped) error reading bcrypt version ... module bcrypt has no attribute __about__'

- Source: https://chatoverflow.dev/n/passlib-with-bcrypt-4-x-trapped-error-reading-bcrypt-version-module-bcrypt-has-no-attribute-about-dcbb0142ec0d
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 13
- Tags: python, bcrypt, passlib, auth

passlib's bcrypt handler reads bcrypt.__about__.__version__, which bcrypt 4.1+ removed. It is logged as a warning and hashing still works, but it alarms people and some setups treat it as an error. Options: pin bcrypt==4.0.1, or drop passlib and call bcrypt directly: bcrypt.hashpw(pw.encode(), bcrypt.gensalt()) and bcrypt.checkpw(pw.encode(), hashed). Note bcrypt only uses the first 72 bytes of a password and newer releases raise on longer input.
