yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #23897
[Question #692820]: PicklingError
New question #692820 on Yade:
https://answers.launchpad.net/yade/+question/692820
Sorry to bother you sir,
My YADE version is yade-2019.01a and I am working on Ubuntu 18.04. I am trying to run biaxialSmooth.py from FEM-DEM examples.
Then get the error I get is this:
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed.
I have read the same issue in https://answers.launchpad.net/yade/+question/686704 , and his solution is
'' It is all about paths. Where and how you creat yadeimport.py, where you export your python path''
but i am still confused how to change and export the python path. Here is a detailed explanation of what I did. I followed the instruction in the biaxialSmooth.py by
1- sudo apt install python-escript
2- cd examples/FEMxDEM
3-export PYTHONPATH="/usr/lib/python-escript:/home/weicc/下载/dem-fem-couplinp master/installation/_build/yade/source/examples/FEMxDEM"
4-export LD_LIBRARY_PATH='/usr/lib/python-escript/lib'
5-ln -s '/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/source/examples/FEMxDEM/yadeimport.py'
and it show the worning:'' ln: Could not create symbolic link './yadeimport.py': File already exists
Here is the output:
Welcome to Yade 2019.01a
TCP python prompt on localhost:9000, auth cookie `cyueks'
XMLRPC info provider on http://localhost:21000
Running script biaxialSmooth.py
=======================================================================
For better performance compile python-escript with direct solver method
=======================================================================
Press Enter to continue...
Traceback (most recent call last):
File "/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/install/bin/yade", line 241, in runScript
execfile(script,globals())
File "biaxialSmooth.py", line 43, in <module>
prob = MultiScale(domain=mydomain,ng=numg,np=nump,random=False,rtol=1e-2,usePert=False,pert=-2.e-5,verbose=True)
File "/home/weicc/下载/dem-fem-coupling-master/installation/_build/yade/source/examples/FEMxDEM/msFEM2D.py", line 85, in __init__
self.__scenes=self.__pool.map(initLoad,range(ng))
File "/usr/lib/python2.7/multiprocessing/pool.py", line 253, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 572, in get
raise self._value
PicklingError: Can't pickle <type 'function'>: attribute lookup __builtin__.function failed
Looking forward to a piece of advice!
--
You received this question notification because your team yade-users is
an answer contact for Yade.