ValueError: setting an array element with a sequence

Asked by Yor1

Hello Yade users,

I try to sample my microcracks to determinate the acoustic event during the simulation.
To reach my goal, i wrote a script "cracks_sampling.py". In the beginning of the script i try to import the microcracks data.
But i run the script, i obtain this error message :" ValueError: setting an array element with a sequence".
I understand that the origin of the problem is my microcracks data but i don't what i have to do to overcome this problem knowing that my microcracks data is 6.4 Mo.

You can download the script from this link : https://filex.univ-lorraine.fr/get?k=xyFvdVA5UVm4mF1Rr11
You can download the cracks data from this link : https://filex.univ-lorraine.fr/get?k=rmY3BBKtB9Vk9r6ryqT

Best regards.
Jabrane.

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Jabrane,

please provide a consistent script and .txt data. In this example I got either
IOError: [Errno 2] No such file or directory: 'cracks_X6Y12Z6_notch_compressionTest_0MPa_bis.txt'
or with "cracks_...0MPa.txt":
ValueError: Wrong number of columns at line 470

cheers
Jan

Revision history for this message
Yor1 (jabrane-hamdi) said :
#2

Hi Jan,

Thank you for the response.
In fact, I got the problem and i resolve it this morning.
The origin of the problem is the manner of editing the txt file in the sources files (JointedCohesiveFrictionalPM.cpp).
For the traction cracks, these parameters are edited : iteration, X, Y, Z, Norm0, Norm1, Norm2, traction, shear Aperture, Time, Energy.
But for the shear cracks, just these parameters are edited : iteration, X,Y,Z, Norm0, Norm1, Norm2, traction, shear Energy.
So the error message is correct because i try to insert vectors of 10 element with vectors with 12 element.
I corrected this mistake of data editing.
And the script work very well.

Best regards.
Jabrane.

Can you help with this problem?

Provide an answer of your own, or ask Yor1 for more information if necessary.

To post a message you must log in.