I have poked around using pdb and am generally confused:
calling this ipdb> Optional( delimitedList( variable ),default = [] ) Out[2]: [W:(abcd...,abcd...),...] just before the line that causes the problem is fine, but executing this line
/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/sfe/fem/parseEq.py(79)createBNF() 78 + Optional( delimitedList( variable ), ---> 79 default = [] )( "args" ) + ")" 80 term.setParseAction( collectTerm( termDescs, lc, itps ) )
ipdb> l
74 + ident( "region" ) + "." +
flag( "flag" ) |
75 ident( "integral" ) + "." +
ident( "region" ) |
76 ident( "region" )
77 )))( "termDesc" ) + "("
78 + Optional( delimitedList( variable ),
---> 79 default = [] )( "args" ) + ")"
80 term.setParseAction( collectTerm( termDescs, lc, itps ) )
81
82 rhs1 = equal + OneOrMore( term )
83 rhs2 = equal + zero
84 equation = StringStart() + OneOrMore( term )\
produces:
ipdb> n TypeError: "'Optional' object is not callable"
any ides?
Ryan
On Wed, May 14, 2008 at 1:14 PM, Ondrej Certik ond...@certik.cz wrote:
On Wed, May 14, 2008 at 7:46 PM, RyanGT ryan...@gmail.com wrote:
I have correctly installed and tested SfePy on my desktop. I am having issues on my laptop. Both are running Ubuntu Gutsy. I think I followed the same procedure on both. make finishes on both machines without errors. Here is the output of trying to run "python simple.py input/poisson.py":
ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python simple.py input/poisson.py sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] sfe: reading mesh... sfe: ...done in 0.03 s sfe: setting up domain edges... sfe: ...done in 0.02 s sfe: setting up domain faces... sfe: ...done in 0.01 s sfe: creating regions... sfe: leaf Gamma_Right region_4 sfe: leaf Omega region_1000 sfe: leaf Gamma_Left region_03 sfe: ...done in 0.04 s sfe: equation "Temperature": sfe: dw_laplace.i1.Omega( coef.val, s, t ) = 0 Traceback (most recent call last): File "simple.py", line 106, in <module> main() File "simple.py", line 98, in main dpb, vecDP, data = solveDirect( conf, options ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 155, in solveDirect pb, state, data = solveStationary( conf, saveNames = saveNames ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/solvers/generic.py", line 55, in solveStationary problem = ProblemDefinition.fromConf( conf ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 67, in fromConf obj.setEquations( conf.equations ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/problemDef.py", line 133, in setEquations equations.parseTerms( self.domain.regions ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 147, in parseTerms eq.parseTerms( regions, self.caches ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 230, in parseTerms terms = parseTerms( regions, self.desc, self.itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/equations.py", line 26, in parseTerms bnf = createBNF( termDescs, itps ) File "/home/ryan/siue/Research/SfePy_build/sfepy-release-00.41.03/ sfe/fem/parseEq.py", line 79, in createBNF default = [] )( "args" ) + ")" TypeError: 'Optional' object is not callable
So, it seems like something is missing, but I don't know what sfe: warning: other missing: ['functions', 'modules', 'epbc_[0-9]+| epbcs', 'lcbc_[0-9]+|lcbcs', 'nbc_[0-9]+|nbcs'] means.
Here is the output of "python runTests.py": ryan@ryan-duo-laptop:~/siue/Research/SfePy_build/sfepy- release-00.41.03$ python runTests.py <<< directory: tests, test files: 18 tests/test_input_kostka.py --- test_input: failed! tests/test_input_octahedron.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 --- test_input: failed! tests/test_input_navier_stokes.py --- test_input: failed! tests/test_input_poisson.py --- test_input: failed! tests/test_elasticity_small_strain.py --- test_get_solution: failed! +++ test_linear_terms: ok tests/test_quadratures.py --- test_problemCreation: failed! tests/test_io.py +++ test_recursiveDictHDF5: ok --- test_sparseMatrixHDF5: failed! tests/test_parsing.py --- test_parseEquations: failed! +++ test_parseRegions: ok tests/test_periodic_bc_3d.py +++ test_pbc: ok tests/test_input_pfdpm_permeability.py --- test_input: failed! tests/test_lcbc_2d.py --- test_linearRigidBodyBC: failed! tests/test_periodic_bc_2d.py +++ test_pbc: ok tests/test_input_le.py --- test_input: failed! tests/test_input_time_poisson.py --- test_input: failed! tests/test_base.py +++ test_structAdd: ok +++ test_structIAdd: ok tests/test_lcbc_3d.py --- test_linearRigidBodyBC: failed! tests/test_input_sinbc.py --- test_input: failed! tests/test_meshio.py nodes: 100% | ###################################################| Time: 00:00:00 elements: 100% | ################################################| Time: 00:00:01 +++ test_readMeshes: ok +++ test_compareSameMeshes: ok 18 test file(s) executed in 7.65 s, 14 failure(s) of 23 test(s)
What do I need to do to get this fixed?
Thanks for your interest and for trying it out!
This seems to me like some internal problem in sfepy. Robert, do you have any ideas what's wrong?
I can just suggest you the usual -- use a debugger like winpdb and try to figure out where the problem is. I would have to do the same here. If you have more questions, ask, maybe I'll be able to answer some. :)
Ondrej