2 months ago
I am facing issues with my deployments in ERRA-dev, where my deployments are failing
Errors:
- File "src/charset_normalizer/cd.pyx", line 1, in init charset_normalizer.cd
AttributeError: module 'charset_normalizer.md' has no attribute 'CharInfo'
- Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Package operations: 55 installs, 9 updates, 0 removals
- Installing aiohappyeyeballs (2.6.1)
- Installing aiohttp (3.13.2)
- Installing aiohttp-retry (2.9.1)
- Installing aiosignal (1.4.0)
- Installing alembic (1.18.4)
- Installing annotated-doc (0.0.4)
- Installing annotated-types (0.7.0)
- Downgrading anyio (4.14.2 -> 4.12.0)
- Installing apscheduler (3.11.2)
- Installing asyncpg (0.31.0)
- Installing attrs (25.4.0)
- Installing authlib (1.6.10)
- Downgrading certifi (2026.7.22 -> 2025.11.12)
- Downgrading cffi (2.1.1 -> 2.0.0)
- Downgrading cryptography (50.0.0 -> 44.0.3)
- Installing distro (1.9.0)
- Installing click (8.3.1)
- Installing ecdsa (0.19.2)
- Installing fastapi (0.127.1)
- Installing frozenlist (1.8.0)
- Installing google-auth (2.49.1)
- Installing google-genai (1.70.0)
- Installing googlemaps (4.10.0)
- Installing greenlet (3.3.0)
- Installing itsdangerous (2.2.0)
- Installing iniconfig (2.3.0)
- Installing mako (1.3.10)
- Downgrading idna (3.18 -> 3.11)
- Installing markupsafe (3.0.3)
- Installing multidict (6.7.0)
- Downgrading packaging (26.3 -> 26.2)
- Installing pillow (12.2.0)
- Installing pluggy (1.6.0)
- Installing propcache (0.4.1)
- Installing psycopg2-binary (2.9.11)
- Installing pyasn1 (0.6.3)
- Installing pyasn1-modules (0.4.2)
- Downgrading pycparser (3.0 -> 2.23)
- Installing pydantic (2.12.5)
- Installing pydantic-core (2.41.5)
- Installing pygments (2.20.0)
- Installing pyjwt (2.10.1)
- Installing pytest (9.0.3)
- Installing python-dotenv (1.2.1)
- Installing python-jose (3.5.0)
- Installing python-multipart (0.0.21)
CalledProcessError
Command '['/usr/local/bin/python3.13', '-m', 'pip', 'uninstall', 'packaging', '-y']' returned non-zero exit status 1.
at /usr/local/lib/python3.13/subprocess.py:577 in run
573│ # We don't call process.wait() as .__exit__ does that for us.
574│ raise
575│ retcode = process.poll()
576│ if check and retcode:
→ 577│ raise CalledProcessError(retcode, process.args,
578│ output=stdout, stderr=stderr)
579│ return CompletedProcess(process.args, retcode, stdout, stderr)
580│
581│ The following error occurred when trying to handle this error:
EnvCommandError
Command ['/usr/local/bin/python3.13', '-m', 'pip', 'uninstall', 'packaging', '-y'] errored with the following return code 1
Output:
Traceback (most recent call last):
File "<frozen runpy>", line 203, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/local/lib/python3.13/site-packages/pip/__main__.py", line 24, in <module>
sys.exit(_main())
~~~~~^^13 Replies
2 months ago
Having looked into this, the issue appears to be in your application code or configuration rather than the Railway platform itself, which puts it outside what Railway support can resolve directly.
This is exactly the kind of problem the Railway community is good at, so we'd like to open your thread as a community bounty. Railway pays a bounty to the community member who solves it, and threads like this usually get picked up quickly.
Opening it makes this entire thread public, including everything already posted. Nothing becomes public until you decide. Use the buttons below.
- Open to the community - Before you click, take a moment to edit or remove anything you'd rather not share. The thread becomes publicly visible right away.
- Keep it private and close the thread - Nothing becomes public and the thread closes.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
but this is completely related to the packages and how they are getting installed
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
This still looks like an application-level problem, so Railway support can't take it further, but the community can. The buttons below are still live: open the thread up as a public bounty after editing out anything sensitive, or keep it private and close it.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
It was working completely fine with the same dockerfile a few days ago
Status changed to Awaiting Railway Response Railway • about 2 months ago
2 months ago
Nothing changed
2 months ago
Kindly check into the build time for Railway, there was no change made into the dockerfile or the way the image is getting built
2 months ago
This still looks like an application-level problem, so Railway support can't take it further, but the community can. The buttons below are still live: open the thread up as a public bounty after editing out anything sensitive, or keep it private and close it.
Status changed to Awaiting User Response Railway • about 2 months ago
2 months ago
This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.
Status changed to Open Railway • about 2 months ago
2 months ago
It does seem like builds are taking a really long time, I just need to quickly build this playwright mcp docker image and it takes like 3 minutes to actually start building. The first 2 and a half minutes are just blank
here's the Dockerfile
FROM mcr.microsoft.com/playwright/mcp:latest
COPY <<'EOF' /config.json
{
"imageResponses": "allow",
"browser": {
"contextOptions": {
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
"locale": "en-US",
"timezoneId": "America/New_York",
"viewport": { "width": 1440, "height": 900 },
"deviceScaleFactor": 2,
"colorScheme": "light",
"extraHTTPHeaders": {
"Accept-Language": "en-US,en;q=0.9"
}
},
"launchOptions": {
"args": ["--disable-blink-features=AutomationControlled"]
}
}
}
EOF
ENV PLAYWRIGHT_MCP_CONFIG=/config.json
My other projects used to only takes around 40s - 1m to build and deploy, now it takes a good 5 minutes with 3 minutes just waiting, when the build and deploy comes, it only takes a short time since everything is cached
Attachments
crowe
It does seem like builds are taking a really long time, I just need to quickly build this playwright mcp docker image and it takes like 3 minutes to actually start building. The first 2 and a half minutes are just blank  here's the Dockerfile ```Dockerfile FROM mcr.microsoft.com/playwright/mcp:latest COPY <<'EOF' /config.json { "imageResponses": "allow", "browser": { "contextOptions": { "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36", "locale": "en-US", "timezoneId": "America/New_York", "viewport": { "width": 1440, "height": 900 }, "deviceScaleFactor": 2, "colorScheme": "light", "extraHTTPHeaders": { "Accept-Language": "en-US,en;q=0.9" } }, "launchOptions": { "args": ["--disable-blink-features=AutomationControlled"] } } } EOF ENV PLAYWRIGHT_MCP_CONFIG=/config.json ``` My other projects used to only takes around 40s - 1m to build and deploy, now it takes a good 5 minutes with 3 minutes just waiting, when the build and deploy comes, it only takes a short time since everything is cached
2 months ago
I don't think your issue is related to the issue OP is currently having.
Maybe just a busy builder.
2 months ago
so I just did redeploy on some of my service and I do seem to realize that about exactly 3 - 3m10s do the building and deploying starts, it could be the servers are busy I get it, but usually my deploys are about 40s so that's why I give comment on this, not exactly OP's fault so my comment might be a bit out of place
2 months ago
I'm experiencing super slow builds too - something that usually takes < 2 minutes is taking close to 10 at the moment
23 days ago
Your build error and the "packaging" pip-uninstall failure are the same root cause, not two separate problems.
What's happening: Skipping virtualenv creation, as specified in config file means Poetry is installing packages directly into the base image's shared system site-packages instead of an isolated virtualenv. Combined with Railway/Nixpacks caching build layers between deploys, old compiled files from a previous build can persist alongside newly-resolved package versions. Your log shows the lockfile resolving 55 installs/updates — that fresh resolution collided with stale cached files from the prior build, which is exactly what produces AttributeError: module 'charset_normalizer.md' has no attribute 'CharInfo' (the compiled cd extension and the pure-Python md module are from two different versions of the package sitting on disk at once). The pip uninstall packaging CalledProcessError right after is a downstream symptom of that same inconsistent environment — a partial version mismatch often corrupts pip's install metadata enough that clean uninstalls fail.
That's also why "nothing changed in the Dockerfile" — you're right, it didn't need to. The lockfile resolving differently against a stale cached layer is enough to trigger this on its own.
To unblock immediately:
- Clear Railway's build cache for this service (Settings → and redeploy — this forces a completely clean base layer instead of reusing the corrupted cached one).
To fix it properly so it doesn't recur:
- Stop skipping virtualenv creation. If you have
POETRY_VIRTUALENVS_CREATE=falseset as an env var, orcreate = falseunder[virtualenvs]in your Poetry config, remove it. Installing into an isolated venv means a stale system-level package can never collide with what Poetry resolves fresh each build. - Pin
charset-normalizerto an exact version inpyproject.toml(e.g.charset-normalizer = "3.4.0") and regeneratepoetry.lock, so a future lockfile resolution can't silently pull in an incompatible version.
If clearing the cache alone fixes it, that confirms the stale-layer theory. If it still fails after a clean cache, the next thing worth checking is whether your base/builder image itself already ships a system-level charset-normalizer that's colliding with Poetry's install — happy to help dig into that if step 1 doesn't fully resolve it.