Skip to content

Unknown error occurred while uploading file #2254

Open
@germa89

Description

@germa89

Before submitting the issue

  • I have checked for Compatibility issues
  • I have searched among the existing issues
  • I am using a Python virtual environment

Description of the bug

So I did created a DPF-standalone image and I am now trying to use it in PyMAPDL CICD.

However I am getting the following error:

    @pytest.fixture()
    def model(dpf_server, mapdl, solved_box, tmpdir):
        # Download RST file
        rst_path = mapdl.download_result(str(tmpdir.mkdir("tmpdir")))
    
        # Upload RST
        if not dpf_server.local_server:
>           rst_path = dpf.upload_file_in_tmp_folder(rst_path, server=dpf_server)

tests/test_dpf.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.venv_312/lib/python3.12/site-packages/ansys/dpf/core/core.py:106: in upload_file_in_tmp_folder
    return base.upload_file_in_tmp_folder(file_path, new_file_name)
.venv_312/lib/python3.12/site-packages/ansys/dpf/core/core.py:834: in upload_file_in_tmp_folder
    return self._api.data_processing_upload_file(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ()
kwargs = {'client': <ansys.dpf.core.server_types.LegacyGrpcServer object at 0x14b937bc0>, 'file_path': '/private/var/folders/m7/qsr6z1m57rx8z_8xj8f3nm9r0000gp/T/pytest-of-german.ayuso/pytest-5/test_metadata_meshed_region0/tmpdir/file.rst', 'to_server_file_path': 'file.rst', 'use_tmp_dir': True}
_InactiveRpcError = <class 'grpc._channel._InactiveRpcError'>, _MultiThreadedRendezvous = <class 'grpc._channel._MultiThreadedRendezvous'>
details = 'unknown error occurred while uploading file'

    @wraps(func)
    def wrapper(*args, **kwargs):
        """Capture gRPC exceptions."""
        from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous
        try:
            out = func(*args, **kwargs)
        except (_InactiveRpcError, _MultiThreadedRendezvous) as error:
            details = error.details()
            if "object is null in the dataBase" in details:
                raise DPFServerNullObject(details) from None
            elif "Unable to open the following file" in details:
                raise DPFServerException(
                    "The result file could not be found or could not be opened, the server raised an error message: \n" + details) from None
>           raise DPFServerException(details) from None
E           ansys.dpf.gate.errors.DPFServerException: unknown error occurred while uploading file

.venv_312/lib/python3.12/site-packages/ansys/dpf/gate/errors.py:46: DPFServerException

DPF debug

root@24f60efe4feb:/home# ls
2025_05_05-09-36-57  TrackDump.log
root@24f60efe4feb:/home# cat TrackDump.log 
DPF:operator:grpc::stream_provider
root@24f60efe4feb:/home# cat TrackDump.log 
DPF:operator:grpc::stream_provider
root@24f60efe4feb:/home# cat 2025_05_05-09-36-57/init.log 
entering grpc::stream_provider:Id0
|  INPUTS 
|  |  -> in(prov) 0:     <string> 
|  |  -> in(prov) 1:     <string> 50052
|  |  -> in(prov) 2:     <int32> 0
|  |  -> in(prov) 3:     <bool> true
|  |  -> in(prov) 4:     <data_sources> n_result_file=1; result_files=[]; n_file=1; files=[; ]; 
|   
root@24f60efe4feb:/home# 

Steps To Reproduce

Code to replicate

# Setting docker
docker pull ghcr.io/ansys/mapdl:v25.2-ubuntu-dpf-standalone
docker pull ghcr.io/ansys/mapdl:v25.2.4-ubuntu-standard

# Running docker
docker run -d --name MAPDL_INT_v25.2.4-ubuntu-standard --restart always --env [email protected] --env ANSYS_LOCK='OFF' --publish 50052:50052 --publish 50055:50055 -w /local/simulation --cpus 4 --oom-kill-disable --memory=8GB --memory-swap=8GB --shm-size=4GB -u 0:0 --cap-add syslog ghcr.io/ansys/mapdl:v25.2.4-ubuntu-standard -np 4 -m 8192 -db 4096 -meba
docker run -d --name dpfserver -p 50058:50052 -e DATAPROCESSING_DEBUG=/home/ ghcr.io/ansys/mapdl:v25.2-ubuntu-dpf-standalone

# Clonning pymapdl
git clone https://github.com/ansys/pymapdl.git
cd pymapdl

# Setting up the environment
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[test]'

export PYMAPDL_START_INSTANCE=false
export PYMAPDL_PORT=50052
export DPF_PORT=50058
export HAS_DPF=TRUE
export DPF_START_SERVER=false
pytest -k dpf

Which Operating System causes the issue?

MacOS

Which DPF/Ansys version are you using?

DPF Server 2025.2.pre0

Which Python version causes the issue?

3.12

Installed packages

accessible-pygments==0.0.5
aiohappyeyeballs==2.4.6
aiohttp==3.11.13
aiosignal==1.3.2
alabaster==1.0.0
ansys-api-mapdl==0.5.2
ansys-api-platform-instancemanagement==1.1.2
ansys-dpf-core==0.13.6
-e git+https://github.com/ansys/pymapdl.git@1068dceb79f177260ab195b8b733e0bd5a8be192#egg=ansys_mapdl_core
ansys-mapdl-reader==0.54.2
ansys-math-core==0.2.2
ansys-platform-instancemanagement==1.1.2
ansys-sphinx-theme @ git+https://github.com/ansys/ansys-sphinx-theme.git@07641597268ba45bc63dbe80271e4eaebc506b9a
ansys-tools-path==0.7.1
ansys-tools-visualization-interface==0.9.1
anyio==4.8.0
appdirs==1.4.4
appnope==0.1.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==3.0.0
async-lru==2.0.4
attrs==24.2.0
autopep8==2.3.2
babel==2.17.0
beautifulsoup4==4.13.3
bleach==6.2.0
cachetools==5.5.2
certifi==2025.1.31
cffi==1.17.1
cfgv==3.4.0
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
comm==0.2.2
contourpy==1.3.1
coverage==7.6.12
cycler==0.12.1
debugpy==1.8.12
decorator==5.2.1
defusedxml==0.7.1
distlib==0.3.9
docutils==0.21.2
executing==2.2.0
fastjsonschema==2.21.1
filelock==3.18.0
fonttools==4.56.0
fqdn==1.5.1
frozenlist==1.5.0
geomdl==5.3.1
google-api-core==2.24.1
google-api-python-client==2.162.0
google-auth==2.38.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.68.0
gprof2dot==2024.6.6
grpcio==1.70.0
h11==0.14.0
httpcore==1.0.7
httplib2==0.22.0
httpx==0.28.1
identify==2.6.9
idna==3.10
imageio==2.37.0
imageio-ffmpeg==0.6.0
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.0.0
ipydatawidgets==4.3.5
ipykernel==6.29.5
ipython==8.32.0
ipywidgets==8.1.5
isoduration==20.11.0
jedi==0.19.2
Jinja2==3.1.5
json5==0.10.0
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter==1.1.1
jupyter-console==6.6.3
jupyter-events==0.12.0
jupyter-lsp==2.2.5
jupyter-sphinx==0.5.3
jupyter_client==8.6.3
jupyter_core==5.7.2
jupyter_server==2.15.0
jupyter_server_terminals==0.5.3
jupyterlab==4.3.5
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.3
jupyterlab_widgets==3.0.13
kiwisolver==1.4.8
MarkupSafe==3.0.2
matplotlib==3.10.1
matplotlib-inline==0.1.7
mistune==3.1.2
more-itertools==10.6.0
msgpack==1.1.0
multidict==6.1.0
narwhals==1.28.0
nbclient==0.10.2
nbconvert==7.16.6
nbformat==5.10.4
nest-asyncio==1.6.0
nodeenv==1.9.1
notebook==7.3.2
notebook_shim==0.2.4
numpy==2.2.3
numpydoc==1.8.0
overrides==7.7.0
packaging==24.2
pandas==2.2.3
pandocfilters==1.5.1
parso==0.8.4
pdf2image==1.17.0
pexpect==4.9.0
pillow==11.1.0
platformdirs==4.3.6
plotly==6.0.0
pluggy==1.5.0
pooch==1.8.2
pre_commit==4.2.0
prometheus_client==0.21.1
prompt_toolkit==3.0.50
propcache==0.3.0
proto-plus==1.26.0
protobuf==4.25.6
psutil==7.0.0
ptyprocess==0.7.0
pure_eval==0.2.3
pyansys-tools-report==0.8.2
pyansys-tools-versioning==0.6.0
pyasn1==0.6.1
pyasn1_modules==0.4.1
pycodestyle==2.12.1
pycparser==2.22
pydata-sphinx-theme==0.16.1
pyfakefs==5.8.0
Pygments==2.19.1
pyiges==0.3.1
pypandoc==1.15
pyparsing==3.2.1
pytest==8.3.5
pytest-cov==6.1.1
pytest-profiling==1.8.1
pytest-random-order==1.1.1
pytest-reportlog==0.4.0
pytest-rerunfailures==15.0
pytest-sphinx==0.6.3
pytest-timeout==2.3.1
pytest_pyvista==0.1.9
python-dateutil==2.9.0.post0
python-json-logger==3.2.1
pythreejs==2.4.2
pytz==2025.1
pyvista==0.44.1
PyYAML==6.0.2
pyzmq==26.2.1
referencing==0.36.2
requests==2.32.3
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
roman-numerals-py==3.1.0
rpds-py==0.23.1
rsa==4.9
scipy==1.15.2
scooby==0.10.0
Send2Trash==1.8.3
setuptools==75.8.1
six==1.17.0
sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==8.2.1
sphinx-autobuild==2024.10.3
sphinx-autodoc-typehints==3.1.0
sphinx-copybutton==0.5.2
sphinx-gallery==0.19.0
sphinx-jinja==2.0.2
sphinx-notfound-page==1.1.0
sphinx_design==0.6.1
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
sphinxcontrib-websupport==2.0.0
sphinxemoji==0.3.1
stack-data==0.6.3
starlette==0.46.0
tabulate==0.9.0
terminado==0.18.1
tinycss2==1.4.0
tornado==6.4.2
tqdm==4.67.1
traitlets==5.14.3
traittypes==0.2.1
trame==3.8.0
trame-client==3.5.2
trame-server==3.3.0
trame-vtk==2.8.15
trame-vuetify==2.8.1
types-python-dateutil==2.9.0.20241206
typing_extensions==4.12.2
tzdata==2025.1
uri-template==1.3.0
uritemplate==4.1.1
urllib3==2.3.0
uvicorn==0.34.0
virtualenv==20.29.3
vtk==9.3.1
watchfiles==1.0.4
wcwidth==0.2.13
webcolors==24.11.1
webencodings==0.5.1
websocket-client==1.8.0
websockets==15.0
widgetsnbextension==4.0.13
wslink==2.3.2
yarl==1.18.3
zipp==3.21.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions