← Back to team overview

yade-users team mailing list archive

Re: String Argument Error

 

Understood, thanks for the help.

Unfortunately the same thing happened for the interaction dispatcher, I've rechecked the syntax & I'm not sure why the error is happening:
O.engines+=[InteractionDispatchers([Ig2_Sphere_Sphere_Dem3DofGeom(distFactor=intradius)],[Ip2_CpmMat_CpmMat_CpmPhys()])]

Sorry for the trouble.

I tried running an e.g. script but received the following error after a few steps while the script was running:
20100728T155612p4107 compression -0.0616181624995 -581028.439072
Damaged, stopping.
Strengths fc=-2.47684e+07, ft=3.71299e+06, |fc/ft|=6.67074
gnuplot---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)

/usr/local/yade-0.50/lib/yade-0.50/py/yade/__init__.py in <module>()
----> 1
      2
      3
      4
      5

/usr/local/yade-0.50/lib/yade-0.50/py/yade/__init__.py in stopIfDamaged()
    161                         print 'Strengths fc=%g, ft=%g, |fc/ft|=%g'%(fc,ft,abs(fc/ft))
    162                         title=O.tags['description'] if 'description' in O.tags.keys() else O.tags['params']
--> 163                         print 'gnuplot',plot.saveGnuplot(O.tags['id'],title=title)
    164                         print 'Bye.'
    165                         # O.pause()


/usr/local/yade-0.50/lib/yade-0.50/py/yade/plot.py in saveGnuplot(baseName, term, extension, timestamp, comment, title, varData)
    147         if timestamp: baseName+=time.strftime('_%Y%m%d_%H:%M')
    148         baseNameNoPath=baseName.split('/')[-1]
--> 149         fData=bz2.BZ2File(baseName+".data.bz2",'w');
    150         fData.write("# "+"\t\t".join(vars)+"\n")
    151         for i in range(lData):

IOError: [Errno 13] Permission denied: '20100728T155612p4107.data.bz2'

Thanks,
Ken

-----Original Message-----
From: Václav Šmilauer [mailto:eudoxos@xxxxxxxx] 
Sent: Wednesday, July 28, 2010 2:32 PM
To: yade-users@xxxxxxxxxxxxxxxxxxx
Cc: Ken Mendoza
Subject: Re: String Argument Error


> I’m a new yade user & was experimenting with yade-0.50 when I ran into
> the following problem while trying to implement a variation of the
> examples in the user manual:

Hi Ken,

please do not contact me directly, use the
yade-users@xxxxxxxxxxxxxxxxxxx list for such questions so that other
people might reply or read the answer from archives later
(https://yade-dem.org/sphinx/user.html#mailing-lists)

> Yade [3]: for i in range(21):
> 
>      ...:     O.bodies.append([utils.sphere([0,0,i],1)])
This is a shorter way:

O.bodies.append([utils.sphere([0,0,i],1) for i in range(21)])

> Yade [4]: intradius=1.5
> 
> Yade [5]: O.engines=[ForceResetter()]
> 
> Yade [6]: O.engines=O.engines
> +[BoundDispatcher(Bo1_Sphere_Aabb(aabbEnlargeFactor=intradius))]

Bound dispatcher takes _list_ of functors. That line must read

  BoundDispatcher([Bo1_Sphere_Aabb(aabbEnlargeFactor=intradius)])

It is more efficient to assign O.engines at once:

O.engines=[ForceResetter(),BoundDispatcher([...]),...]

(See also simulations in the examples directory, for more complicated
stuff.)

> RuntimeError: First argument (if given) must be a string.
(This message is somewhat confusing (although true) and it was fixed in
the development version of yade.)

Cheers, Václav


> This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. 
> Please do not copy it or use it for any purpose, or disclose its contents to any other person. Thank you.
?!



This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. 
Please do not copy it or use it for any purpose, or disclose its contents to any other person. Thank you.

Follow ups

References