Deployment Failure on Railway: Cryptography Package Error

amgartendev
TRIAL

8 months ago

Hello,

I've been facing a really annoying problem while trying to deploy my Web App developed in Python. I often find myself running my services and encountering an error that only occurs on Railway but never happens locally.

My Railway project consists of three services: a MySQL database, a Python server, and a Python client (the user interface). The project returns an error, but I can't pinpoint exactly when it happens. At certain times of the day, the deployment works just fine, while at other times, it fails. Several times when the deployment failed, I redeployed all three services, but nothing changed. However, when I checked back 30 minutes later, the deployment worked.

I'm starting my services in the following order:

  1. MySQL

  2. Server

  3. Client

RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods

In my requirements.txt, I have the "bcrypt" library listed to hash passwords. That's the only encryption-related package I can think of that might be causing the issue. However, the problem is unpredictable, it doesn't always happen, and it has never occurred locally.

I don't really want to install the cryptography package unless it's the only solution.

I can provide a log screenshot if needed.

Solved

0 Replies

amgartendev
TRIAL

8 months ago

826548a8-d043-48d4-9bf2-b274d50f9a26


8 months ago

im not sure why you don't want to install the cryptography package? your code is telling you its needed, and chances are, you have it installed locally


amgartendev
TRIAL

8 months ago

No, I doubled checked and I don't have the cryptography package installed


amgartendev
TRIAL

8 months ago

but okay, thank you


7 months ago

!s


Status changed to Solved brody 8 months ago