Why is pymysql not installed?

nkbljTRIAL

7 months ago

This erro:
File "/opt/venv/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 605, in create_engine

dbapi = dbapi_meth(**dbapi_args)

        ^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/venv/lib/python3.11/site-packages/sqlalchemy/dialects/mysql/pymysql.py", line 75, in import_dbapi

return __import__("pymysql")

       ^^^^^^^^^^^^^^^^^^^^^

ModuleNotFoundError: No module named 'pymysql'

[2024-09-19 18:53:00 +0000] [4] [INFO] Worker exiting (pid: 4)
[2024-09-19 18:53:00 +0000] [1] [INFO] Shutting down: Master
[2024-09-19 18:53:00 +0000] [1] [INFO] Reason: Worker failed to boot.

Even though pymysql is included in "requirements.txt".
Could it be because in my "nixpacks.toml" it says: [phases.setup]
nixPkgs = ['…', 'postgresql']?
But it's because before it gave an error in psycopg2 during the build.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies

7 months ago

Hello,

pymsql is for MySQL, you are using Postgres.


Why is pymysql not installed? - Railway Help Station