The error code in edempy

Fatemeh Hosseini_22198
Fatemeh Hosseini_22198 Altair Community Member
edited July 2023 in Community Q&A

Hello every one,
can you guide me about this error in python?
I used this code for other simulations before, and it worked but now there is one error.

 

Regards,
Fatemeh

 

 

ID_particle=deck.timestep[t].collision.surfGeom.getFirstIds()

File ~\AppData\Roaming\Python\Python39\site-packages\edempy\timestep\SingleCollision.py:300 in getFirstIds
return self.getProperty('first/ids')

File ~\AppData\Roaming\Python\Python39\site-packages\edempy\timestep\SingleCollision.py:82 in getProperty
result = f[self.__collisionPath + '/'+ 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)'

Tagged:

Best Answer

  • Stefan Pantaleev_21979
    Stefan Pantaleev_21979
    Altair Employee
    edited December 2022 Answer ✓

    Hi Fatemeh,

    It looks like edempy is trying to access the collisions in the timestep with an index t but it is not finding them. This may be because no new collisions have occured between the timesteps indexed t and t-1 (i.e. deck is empty or bed is static at this time) or because the simulation has been run with the "Track collisions" optons in the EDEM solver disabled so the collision data is not being saved.

    This error may also have been caused by a mismatch between EDEM and edempy versions. If this is the case you should receive a warning in the python console output saying that unexpected bahaviour may occur.

    Best regards,

    Stefan

Answers

  • Stefan Pantaleev_21979
    Stefan Pantaleev_21979
    Altair Employee
    edited December 2022 Answer ✓

    Hi Fatemeh,

    It looks like edempy is trying to access the collisions in the timestep with an index t but it is not finding them. This may be because no new collisions have occured between the timesteps indexed t and t-1 (i.e. deck is empty or bed is static at this time) or because the simulation has been run with the "Track collisions" optons in the EDEM solver disabled so the collision data is not being saved.

    This error may also have been caused by a mismatch between EDEM and edempy versions. If this is the case you should receive a warning in the python console output saying that unexpected bahaviour may occur.

    Best regards,

    Stefan

  • Mohammad Sadek
    Mohammad Sadek Altair Community Member
    edited July 2023

    Hi Stefan 

    I am using EDEM 2022. I am having the similar error (attached) for AOR. Any suggestion how to fix that? 

    Thank you

  • Stefan Pantaleev_21979
    Stefan Pantaleev_21979
    Altair Employee
    edited July 2023

    Hi Stefan 

    I am using EDEM 2022. I am having the similar error (attached) for AOR. Any suggestion how to fix that? 

    Thank you

    Hi Mohammad,

    The syntax in EDEMpy has changed with the latest version and the deck.creatorData object is now deprecated as per the error message. You can directly use deck.timestep[0].h5Types or similar. Please review the documentation at [EDEMinstallation directory]\EDEMpy\help. Your original code might still work with an older version of EDEMpy and you can execute it with that version in the usual way - i.e by copying the edempy folder from  [Old EDEM installation directory]\python\ to the folder of the deck and executing the script from console or an IDE or by installing the older version from the wheel at [EDEMinstallation directory]\EDEMpy\ to your Python dist.

    Best regards,

    Stefan