I'm trying to transfer a Flask web app to a Raspberry Pi 4b using Docker. The container runs flawlessly on AMD architecture. The ARM architecture is to be tested on the Raspberry. The creation of the image based on python3.12-bookworm and the container creation work without problems on the Raspberry. The container starts and runs. As soon as I call up a page from the website using a browser, I get the error message 'internal server error'.
The following image shows the apache2/error.log from the container.
The directory /usr/local/lib/..../pydantic_core looks like this. There are obviously problems with '_pydantic_core.cpython-312-aarch64-linux-gnu.so'. Does anyone have a solution for this problem?
meanwhile i found, that Python is missing a symbol: /usr/local/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-aarch64-linux-gnu.so: undefined symbol: PyErr_GetRaisedException. But how can i fix that?

