codeforboston / police-data-trust

A national archive of police data collected by journalists, lawyers, and activists around the country.
https://www.nationalpolicedata.org
MIT License
40 stars 70 forks source link

[BUG] bcrypt library failure #373

Open aliavni opened 2 weeks ago

aliavni commented 2 weeks ago

Describe the bug This happens when building the app in Docker. bcrypt library fails with the following error:

api-1  | Database 'police_data' already exists.
api-1  | Initialized the database 'police_data'.
api-1  | (trapped) error reading bcrypt version
api-1  | Traceback (most recent call last):
api-1  |   File "/usr/local/lib/python3.11/site-packages/passlib/handlers/bcrypt.py", line 620, in _load_backend_mixin
api-1  |     version = _bcrypt.__about__.__version__
api-1  |               ^^^^^^^^^^^^^^^^^
api-1  | AttributeError: module 'bcrypt' has no attribute '__about__'

To Reproduce Steps to reproduce the behavior:

  1. Build the app in docker. Since the package version is not pinned, it installs a recent bcrypt version

Expected behavior Docker should build without issues and api container should work.

aliavni commented 2 weeks ago

Here is the PR to fix this issue: https://github.com/codeforboston/police-data-trust/pull/374