missing SpherePack.toSimulation

Asked by matthias

I get an AttributeError while executing this code:
sp=pack.SpherePack()
sp.add(Vector3(..)
ids=sp.toSimulation()

version 1.05.0
OS: Bullx Linux 6.3
AttributeError: 'SpherePack' object has no attribute 'toSimulation'

Matthias

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 Matthias,
could you please provide a complete minimal working script reproducing your
error?
thanks
Jan

2013/12/11 matthias <email address hidden>

> New question #240625 on Yade:
> https://answers.launchpad.net/yade/+question/240625
>
> I get an AttributeError while executing this code:
> sp=pack.SpherePack()
> sp.add(Vector3(..)
> ids=sp.toSimulation()
>
> version 1.05.0
> OS: Bullx Linux 6.3
> AttributeError: 'SpherePack' object has no attribute 'toSimulation'
>
> Matthias
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
matthias (matthias-frank) said :
#2

Yade [1]: sp=SpherePack()
Yade [2]: sp
 -> [2]: <yade._packSpheres.SpherePack object at 0x1a9a368>
Yade [3]: sp.add(Vector3(0,0,0),0.01)
Yade [4]: sp.toSimulation()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/..../yade in <module>()
----> 1

AttributeError: 'SpherePack' object has no attribute 'toSimulation'
Yade [5]: sp.
sp.__class__ sp.__repr__ sp.getClumps
sp.__delattr__ sp.__setattr__ sp.hasClumps
sp.__dict__ sp.__sizeof__ sp.isPeriodic
sp.__doc__ sp.__str__ sp.load
sp.__format__ sp.__subclasshook__ sp.makeCloud
sp.__getattribute__ sp.__weakref__ sp.makeClumpCloud
sp.__getitem__ sp.aabb sp.particleSD
sp.__hash__ sp.add sp.particleSD2
sp.__init__ sp.appliedPsdScaling sp.particleSD_2d
sp.__instance_size__ sp.cellFill sp.psd
sp.__iter__ sp.cellRepeat sp.relDensity
sp.__len__ sp.cellSize sp.rotate
sp.__module__ sp.center sp.save
sp.__new__ sp.dim sp.scale
sp.__reduce__ sp.fromList sp.toList
sp.__reduce_ex__ sp.fromSimulation sp.translate
Yade [5]: sp.

the object sp, instance of SpherePack, has no method toSimulation

could this happen by using wrong compilation parameters? because this build is made by our HPC guys

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Matthias,

the toSimulation method is added to SpherePack class "a posteriori" in
pack.py, see [1]. So try
from yade import pack
as the first command of your session and let us know if it helped or not
cheers
Jan

[1]
http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/py/pack/pack.py#L123

2013/12/11 matthias <email address hidden>

> Question #240625 on Yade changed:
> https://answers.launchpad.net/yade/+question/240625
>
> Status: Answered => Open
>
> matthias is still having a problem:
> Yade [1]: sp=SpherePack()
> Yade [2]: sp
> -> [2]: <yade._packSpheres.SpherePack object at 0x1a9a368>
> Yade [3]: sp.add(Vector3(0,0,0),0.01)
> Yade [4]: sp.toSimulation()
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call last)
>
> /..../yade in <module>()
> ----> 1
>
> AttributeError: 'SpherePack' object has no attribute 'toSimulation'
> Yade [5]: sp.
> sp.__class__ sp.__repr__ sp.getClumps
> sp.__delattr__ sp.__setattr__ sp.hasClumps
> sp.__dict__ sp.__sizeof__ sp.isPeriodic
> sp.__doc__ sp.__str__ sp.load
> sp.__format__ sp.__subclasshook__ sp.makeCloud
> sp.__getattribute__ sp.__weakref__ sp.makeClumpCloud
> sp.__getitem__ sp.aabb sp.particleSD
> sp.__hash__ sp.add sp.particleSD2
> sp.__init__ sp.appliedPsdScaling sp.particleSD_2d
> sp.__instance_size__ sp.cellFill sp.psd
> sp.__iter__ sp.cellRepeat sp.relDensity
> sp.__len__ sp.cellSize sp.rotate
> sp.__module__ sp.center sp.save
> sp.__new__ sp.dim sp.scale
> sp.__reduce__ sp.fromList sp.toList
> sp.__reduce_ex__ sp.fromSimulation sp.translate
> Yade [5]: sp.
>
>
> the object sp, instance of SpherePack, has no method toSimulation
>
> could this happen by using wrong compilation parameters? because this
> build is made by our HPC guys
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

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

To post a message you must log in.