← Back to team overview

yade-users team mailing list archive

Re: [Question #706976]: Reconstruct particles from ct images

 

Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

    Status: Answered => Open

Ruidong LI is still having a problem:
Dear Vasileios,

Thanks for your answer. I have tried your code.

The error is below:

unning script /home/kyle/Yade/install/bin/clump_test1.py
Traceback (most recent call last):
  File "./yade-Unknown", line 343, in runScript
    execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 87, in execfile
    exec_(code, myglobals, mylocals)
  File "/home/kyle/Yade/install/bin/clump_test1.py", line 69, in <module>
    O.bodies.appendClumped(spheres)
TypeError: No registered converter was able to produce a C++ rvalue of type boost::shared_ptr<yade::Body> from this Python object of type tuple

My code is:

inputfile = '/home/kyle/Downloads/yadetxtClumps.txt'
spheres = ymport.textClumps(inputfile,material=sphereMat,discretization=0)
O.bodies.appendClumped(spheres)

The file in the 'inputfile' is like this (contain many clumps):
0.068037 0.02416 0.0017637 0.0011423 1
0.068615 0.022601 0.0014278 0.00077244 1
0.069542 0.023528 0.0017906 0.00071539 1
0.066801 0.025141 0.0019788 0.0006786 1
0.049731 0.03499 0.0017112 0.00070436 10
0.048747 0.034309 0.0013637 0.00063928 10
0.047719 0.034628 0.0014651 0.00056027 10
0.047299 0.035323 0.0020008 0.00052311 10

Sorry to trouble you. But do you know what's wrong with this?

Best,
Kyle

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.