An error happens when I try to open the model in player


108
views
0
4 months ago by
Yuan  
File attached: model.rar (18.01 KB)

Actually, I have installed the numpy, just as the following snapshot.  It seems that there are relatively more errors in Windows compared to others. Is this true? By the way, there are more or less errors for me while using the newer version such as 3.7.5~3.7.7. Now I am using a no gpu version of 3.7.4 in Windows 7 64 bit OS. There was no error at first, but now ......


Community: CompuCell3D

4 Answers


3
4 months ago by
could you post the example you are trying to run. i n general I would stick to newer versions of CC3D as they ship with complete Python distribution. BTW the above error happens because you have not imported random  in Python. If you type
import random

random.rand()​

it should work

However , depending on your simulation you may want to explore numpy's random  utilities in that cas you woudl type

import numpy.random as nr

# now you can type

nr.rand(3,2)

# and this is what you will get
# array([[ 0.14022471,  0.96360618],  #random
#       [ 0.37601032,  0.25528411],  #random
#       [ 0.49313049,  0.94909878]]) #random


see https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.random.rand.html#numpy.random.rand

Thank you. The model is attached now. I don't even use the function in Numpy. So I think the error may due to other reasons. BTW is there a no gpu version for 3.7.7 or 3.7.6 ?
written 4 months ago by Yuan  

In addition to that, there are still two problems for 3.7.7.

1. It seems that there is no CellDraw in 3.7.7
2. If I click the Compucell3D immediately, it will crash in splash screen.

written 4 months ago by Yuan  
3
4 months ago by
The issue with your code was not the model itself but the cc3d file

This is how it looked like:
<Simulation version="3.6.2">
   <XMLScript Type="XMLScript">Simulation/lumen.xml</XMLScript>
   <PythonScript Type="PythonScript">Simulation/lumen.py</PythonScript>
   <Resource Type="Python">Simulation/lumenSteppables.py</Resource>
   <PIFFile>C:\CompuCell3D-64bit\(u'D:\cc3d\lumen\lumen.piff', u'All Files (*)')</PIFFile>
</Simulation>


and this is how it should look like:

<Simulation version="3.6.2">
   <XMLScript Type="XMLScript">Simulation/lumen.xml</XMLScript>
   <PythonScript Type="PythonScript">Simulation/lumen.py</PythonScript>
   <Resource Type="Python">Simulation/lumenSteppables.py</Resource>
</Simulation>

Simply you have specified a path of the PIFFile that did not point to anything and thi sis the reason you have seen the crash

If you want to specify PIFFile path in the .cc3d file you could do the following:

<Simulation version="3.6.2">
   <XMLScript Type="XMLScript">Simulation/lumen.xml</XMLScript>
   <PythonScript Type="PythonScript">Simulation/lumen.py</PythonScript>
   <Resource Type="Python">Simulation/lumenSteppables.py</Resource>
   <PIFFile>Simulation/lumen5.piff</PIFFile>
</Simulation>


File attached: model_yuan_fixed.zip (20.91 KB)



Let us know if this simulation runs on your machine. I have  tested it on windows with 3.7.7. binary

Yes, the model runs normally now. Thanks sincerely.
written 4 months ago by Yuan  
3
4 months ago by
For the time being, yes. How complicated is the geometry you are creating?
Just as the following picture:

written 4 months ago by Yuan  
0
4 months ago by
Thanks for reporting the startup crash issue. We have fixed it.And you are right there is no cell draw in 3.7.7.
So do I have to install an older version if I want to use CellDraw?
written 4 months ago by Yuan  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »