python icon indicating copy to clipboard operation
python copied to clipboard

Fatal Python error: init_fs_encoding in Alpine + Python 3.12 during Docker build

Open Farinaz94 opened this issue 7 months ago • 1 comments

I'm trying to build a Docker image using the following base images:

  • mundialis/actinia:alpine-dependencies-2024-12-14
  • osgeo/grass-gis:releasebranch_8_4-alpine

Inside the Dockerfile, when I run this line:

RUN /usr/bin/python -m venv --system-site-packages --without-pip /opt/venv
I get the following error:
"Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
SyntaxError: source code string cannot contain null bytes"

Farinaz94 avatar Jun 18 '25 10:06 Farinaz94