DPF access violation writing - pynstaller

Hello,

Context

I am building an application that use dpf script to read .rth. I compile this application with pyinstaller.

Tools

Here are the charateristic of what i use :

python : 3-11
dpf server : the one from my instalation of ansys 22r2
ansys dpf core : 0.9.0
ansys dpf gate : 0 4 1
ansys dpf gatebin : 0 4 1

Problem

When I run the application (by clincking on the executable or running the sources) everything is fine.

However, when someone elese run the executable and try to use a feature that ask dpf to read a .rth file, the following error is returned :

I have read a post about it : https://discuss.ansys.com/discussion/3249/error-while-reading-large-55gb-rst-files-in-pydpf-reader but I wonder why it works fine with me and it crash when someone else use the app.

The strangest thing is that there are users that do not have the problem.

To use the solution provided in https://discuss.ansys.com/discussion/3249/error-while-reading-large-55gb-rst-files-in-pydpf-reader it seems that I need to upgrade DPF but I don't know if it fit well with a local dpf serve.

Does anyone had the same issue ?

Kind regards,
Eric Heulhard

Tagged:

Answers

  • Rajesh Meena
    Rajesh Meena Moderator, Employee Posts: 133
    100 Comments 25 Likes Second Anniversary 5 Answers
    ✭✭✭✭

    @Eric Heulhard , Are you forcing the PyDPF to use dpf server from Ansys 2022 for your colleagues as well? It you do not force then it would end up using latest DPF server from installation in their machine and they may end up having incompatibility.

    You can force a particular server through ansys_path variable while starting server.

    https://dpf.docs.pyansys.com/version/dev/api/ansys/dpf/core/server/index.html#server.start_local_server

    Hope it helps.

  • Eric Heulhard
    Eric Heulhard Member Posts: 2
    Name Dropper First Comment
    **

    Hello @Rajesh Meena , I have tried to do this and also to update the version of dpf but it did not work.

    Therefore, I choose to deploy the application by installing a specific environment via pip install on each user's PC instead of using pyinstaller to deploy an .exe.

    This solution works well.

    Thank your for your help,
    Eric