Clawith icon indicating copy to clipboard operation
Clawith copied to clipboard

ModuleNotFoundError: No module named 'app.models.password_reset_token'

Open wangxianjin028 opened this issue 8 months ago • 3 comments

Pre-checks

Deployment Method

Docker

Steps to Reproduce

  1. docker-compose build
  2. docker-compose up -d
  3. backend container report :ModuleNotFoundError: No module named 'app.models.password_reset_token'

Expected vs Actual Behavior

Expected: backend running without exit Actual:

 File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "<stdin>", line 26, in main
ModuleNotFoundError: No module named 'app.models.password_reset_token'
[entrypoint] Detected root user, fixing permissions...
[entrypoint] Dropping privileges to 'clawith' and re-executing...
[entrypoint] Step 1: Creating/verifying database tables...
Traceback (most recent call last):
  File "<stdin>", line 78, in <module>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "<stdin>", line 26, in main
ModuleNotFoundError: No module named 'app.models.password_reset_token'

Logs / Screenshots

 File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "<stdin>", line 26, in main
ModuleNotFoundError: No module named 'app.models.password_reset_token'
[entrypoint] Detected root user, fixing permissions...
[entrypoint] Dropping privileges to 'clawith' and re-executing...
[entrypoint] Step 1: Creating/verifying database tables...
Traceback (most recent call last):
  File "<stdin>", line 78, in <module>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "<stdin>", line 26, in main
ModuleNotFoundError: No module named 'app.models.password_reset_token'

wangxianjin028 avatar Mar 30 '26 02:03 wangxianjin028

+1

zhlqe avatar Mar 30 '26 03:03 zhlqe

@yaojin3616

zhlqe avatar Mar 30 '26 03:03 zhlqe

Thanks for the report! This issue has been resolved in the current version.

The app.models.password_reset_token module was referenced in an early version of the entrypoint bootstrap script. It has since been removed — password reset functionality is now handled entirely by app.services.password_reset_service, which does not require a separate model file.

To resolve: Pull the latest code and rebuild your Docker image:

git pull origin main
docker compose down && docker compose up -d --build

Closing this issue. Feel free to re-open if you encounter it on the latest version.

wisdomqin avatar Apr 02 '26 13:04 wisdomqin