Error Running edempy

Fatemeh Hosseini_22198
Fatemeh Hosseini_22198 Altair Community Member
edited January 2 in Community Q&A

Hello everyone,
I encountered an error while running edempy. Below is the error message:

<em>runfile('C:/Users/fatemeh.hosseini/Desktop/Fatemeh/Sensetivity analysis/spatial algorithm_agglomeration_newest.py', wdir='C:/Users/fatemeh.hosseini/Desktop/Fatemeh/Sensetivity analysis') WARNING: File "12mm-tube-partial_result.dem" was not created using a compatible version of EDEM. Please check edempy and EDEM are up to date.</em>

<em> Unexpected behaviour may occur. This warning can be disabled by setting the optional disableWarnings argument to True in the Deck constructor. e.g. Deck(deckname, disableWarnings=True)</em>

<em> WARNING: File "12mm-tube-partial_result_data/0.h5" was not created using a compatible version of EDEM. </em>

<em>Please check edempy and EDEM are up to date. </em>

<em>Unexpected behaviour may occur. </em>

<em>This warning can be disabled by setting the optional disableWarnings argument to True in the Deck constructor. e.g. Deck(deckname, disableWarnings=True)</em>

Could someone please assist me in resolving this issue?

Regards,
Fatemeh

Tagged:

Answers

  • Renan
    Renan
    Altair Employee
    edited January 2

    Hi Fatemeh,

    As the message says, this is not an error, it's just a warning. The message suggests that the EDEMpy version you're using is different than the version of EDEM you used to run your simulation. It's recommended that you use the same version of EDEM and EDEMpy to run and post process your simulation, respectively.

    Since there's no error, there's nothing to be done. If you want to disable the error message you can do so by using the disableWarnings flag when you define the deck in your code, e.g deck = Deck(deckname, disableWarnings=True)

    Best regards,

    Renan

  • Fatemeh Hosseini_22198
    Fatemeh Hosseini_22198 Altair Community Member
    edited January 2

    Hi Fatemeh,

    As the message says, this is not an error, it's just a warning. The message suggests that the EDEMpy version you're using is different than the version of EDEM you used to run your simulation. It's recommended that you use the same version of EDEM and EDEMpy to run and post process your simulation, respectively.

    Since there's no error, there's nothing to be done. If you want to disable the error message you can do so by using the disableWarnings flag when you define the deck in your code, e.g deck = Deck(deckname, disableWarnings=True)

    Best regards,

    Renan

    Dear Renan,

    Thank you for your quick response.

    Apologies for the oversight in my previous message. I failed to include the complete error message. Following the warnings, the error I received is as follows:

    <em>runfile('C:/Users/fatemeh.hosseini/Desktop/Fatemeh/Sensetivity analysis/spatial algorithm_agglomeration_newest.py', wdir='C:/Users/fatemeh.hosseini/Desktop/Fatemeh/Sensetivity analysis') WARNING: File "12mm-tube-partial_result.dem" was not created using a compatible version of EDEM. Please check edempy and EDEM are up to date.</em>

    <em>Unexpected behaviour may occur. This warning can be disabled by setting the optional disableWarnings argument to True in the Deck constructor. e.g. Deck(deckname, disableWarnings=True)</em>

    <em>WARNING: File "12mm-tube-partial_result_data/0.h5" was not created using a compatible version of EDEM.</em>

    <em>Please check edempy and EDEM are up to date.</em>

    <em>Unexpected behaviour may occur.</em>

    <em>This warning can be disabled by setting the optional disableWarnings argument to True in the Deck constructor. e.g. Deck(deckname, disableWarnings=True)</em>

    Traceback (most recent call last): File ~\Desktop\Fatemeh\Sensetivity analysis\spatial algorithm_agglomeration_newest.py:49 in <module> Pos_contact_X=my_simulation_deck.timestep[t].contact.surfSurf.getXPositions()

    File C:\ProgramData\Anaconda3\lib\site-packages\edempy\timestep\SingleContact.py:193 in getXPositions return self.getPositions()[:,0]

    File C:\ProgramData\Anaconda3\lib\site-packages\edempy\timestep\SingleContact.py:188 in getPositions return self.getProperty('position')

    File C:\ProgramData\Anaconda3\lib\site-packages\edempy\timestep\SingleContact.py:93 in getProperty result = f[self.__contactPath + '/'+ option + '/'][:]

    File h5py\_objects.pyx:54 in h5py._objects.with_phil.wrapper File h5py\_objects.pyx:55 in h5py._objects.with_phil.wrapper

    File C:\ProgramData\Anaconda3\lib\site-packages\h5py\_hl\group.py:305 in __getitem__ oid = h5o.open(self.id, self._e(name), lapl=self._lapl)

    File h5py\_objects.pyx:54 in h5py._objects.with_phil.wrapper

    File h5py\_objects.pyx:55 in h5py._objects.with_phil.wrapper File h5py\h5o.pyx:190 in h5py.h5o.open

    KeyError: 'Unable to open object (component not found)'

     

     

    Regards,
    Fatemeh

  • Renan
    Renan
    Altair Employee
    edited January 2

    Dear Renan,

    Thank you for your quick response.

    Apologies for the oversight in my previous message. I failed to include the complete error message. Following the warnings, the error I received is as follows:

    <em>runfile('C:/Users/fatemeh.hosseini/Desktop/Fatemeh/Sensetivity analysis/spatial algorithm_agglomeration_newest.py', wdir='C:/Users/fatemeh.hosseini/Desktop/Fatemeh/Sensetivity analysis') WARNING: File "12mm-tube-partial_result.dem" was not created using a compatible version of EDEM. Please check edempy and EDEM are up to date.</em>

    <em>Unexpected behaviour may occur. This warning can be disabled by setting the optional disableWarnings argument to True in the Deck constructor. e.g. Deck(deckname, disableWarnings=True)</em>

    <em>WARNING: File "12mm-tube-partial_result_data/0.h5" was not created using a compatible version of EDEM.</em>

    <em>Please check edempy and EDEM are up to date.</em>

    <em>Unexpected behaviour may occur.</em>

    <em>This warning can be disabled by setting the optional disableWarnings argument to True in the Deck constructor. e.g. Deck(deckname, disableWarnings=True)</em>

    Traceback (most recent call last): File ~\Desktop\Fatemeh\Sensetivity analysis\spatial algorithm_agglomeration_newest.py:49 in <module> Pos_contact_X=my_simulation_deck.timestep[t].contact.surfSurf.getXPositions()

    File C:\ProgramData\Anaconda3\lib\site-packages\edempy\timestep\SingleContact.py:193 in getXPositions return self.getPositions()[:,0]

    File C:\ProgramData\Anaconda3\lib\site-packages\edempy\timestep\SingleContact.py:188 in getPositions return self.getProperty('position')

    File C:\ProgramData\Anaconda3\lib\site-packages\edempy\timestep\SingleContact.py:93 in getProperty result = f[self.__contactPath + '/'+ option + '/'][:]

    File h5py\_objects.pyx:54 in h5py._objects.with_phil.wrapper File h5py\_objects.pyx:55 in h5py._objects.with_phil.wrapper

    File C:\ProgramData\Anaconda3\lib\site-packages\h5py\_hl\group.py:305 in __getitem__ oid = h5o.open(self.id, self._e(name), lapl=self._lapl)

    File h5py\_objects.pyx:54 in h5py._objects.with_phil.wrapper

    File h5py\_objects.pyx:55 in h5py._objects.with_phil.wrapper File h5py\h5o.pyx:190 in h5py.h5o.open

    KeyError: 'Unable to open object (component not found)'

     

     

    Regards,
    Fatemeh

    Hi Fatemeh,

    This kind of error usually means that there are no contacts in a particular timestep. You can wrap that part of your code in a try-except block to prevent that error from stopping your code. It would look something like this:

    try:    Pos_contact_X=my_simulation_deck.timestep[t].contact.surfSurf.getXPositions() except KeyError as error:     print("No pp contacts were found")

    Best regards,

    Renan