Dear Niki,
To be specific, I am modifying negdivconf.mako which is with some
header like "pyfr:kernel". I create some constants in ini file
[constants] and quote em with ${['variable']}. However, it said
"TypeError: 'Undefined' object is not subscriptable". The total error
is shown below,
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pyfr/util.py", line 33,
in __call__
res = cache[key]
KeyError: (<function BasePointwiseKernelProvider._render_kernel at
0x7f59b53abea0>,
b'\x80\x03X\n\x00\x00\x00negdivconfq\x00X)\x00\x00\x00pyfr.solvers.baseadvec.kernels.negdivconfq\x01}q\x02(X\x05\x00\x00\x00ndimsq\x03K\x02X\x05\x00\x00\x00srcexq\x04]q\x05(X\x04\x00\x00\x00(0.)q\x06X\x04\x00\x00\x00(0.)q\x07X\x04\x00\x00\x00(0.)q\x08eX\x05\x00\x00\x00nvarsq\tK\x03u\x87q\n.',
b'\x80\x03}q\x00.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pyfr", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/pyfr/__main__.py", line
110, in main
args.process(args)
File "/usr/local/lib/python3.5/dist-packages/pyfr/__main__.py", line
235, in process_run
args, NativeReader(args.mesh), None, Inifile.load(args.cfg)
File "/usr/local/lib/python3.5/dist-packages/pyfr/__main__.py", line
216, in _process_common
solver = get_solver(backend, rallocs, mesh, soln, cfg)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/solvers/__init__.py",
line 16, in get_solver
return get_integrator(backend, systemcls, rallocs, mesh, initsoln,
cfg)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/__init__.py",
line 46, in get_integrator
return integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/dual/controllers.py",
line 48, in __init__
super().__init__(*args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/dual/controllers.py",
line 15, in __init__
super().__init__(*args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/dual/steppers.py",
line 8, in __init__
super().__init__(*args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/dual/base.py",
line 10, in __init__
super().__init__(*args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/base.py",
line 58, in __init__
self._init_system(systemcls, backend, rallocs, mesh, initsoln)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/integrators/base.py",
line 88, in _init_system
self.system = systemcls(*args, nreg=self.nreg, cfg=self.cfg)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/solvers/base/system.py",
line 65, in __init__
self._gen_kernels(eles, int_inters, mpi_inters, bc_inters)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/solvers/base/system.py",
line 174, in _gen_kernels
kernels[pn, kn].append(kgetter())
File
"/usr/local/lib/python3.5/dist-packages/pyfr/solvers/baseadvec/elements.py",
line 116, in <lambda>
rcpdjac=self.rcpdjac_at('upts'), ploc=plocupts, u=solnupts
File
"/usr/local/lib/python3.5/dist-packages/pyfr/backends/base/backend.py",
line 166, in kernel
return kern(*args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/backends/base/kernels.py",
line 158, in kernel_meth
src, ndim, argn, argt = self._render_kernel(name, mod, tplargs)
File "/usr/local/lib/python3.5/dist-packages/pyfr/util.py", line 35,
in __call__
res = cache[key] = self.func(*args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/backends/base/kernels.py",
line 78, in _render_kernel
src = tpl.render(**tplargs)
File "/usr/local/lib/python3.5/dist-packages/pyfr/template.py", line
36, in render
return super().render(*args, **dict(self.dfltargs, **kwargs))
File
"/home/ginn/.local/lib/python3.5/site-packages/mako/template.py", line
462, in render
return runtime._render(self, self.callable_, args, data)
File
"/home/ginn/.local/lib/python3.5/site-packages/mako/runtime.py", line
838, in _render
**_kwargs_for_callable(callable_, data))
File
"/home/ginn/.local/lib/python3.5/site-packages/mako/runtime.py", line
873, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File
"/home/ginn/.local/lib/python3.5/site-packages/mako/runtime.py", line
899, in _exec_template
callable_(context, *args, **kwargs)
File "memory:0x7f59a0a0fd30", line 39, in render_body
File "memory:0x7f59b6bcea20", line 61, in render_body
File
"/home/ginn/.local/lib/python3.5/site-packages/mako/runtime.py", line
692, in wrap_stackframe
return func(context, *args, **kwargs)
File
"/usr/local/lib/python3.5/dist-packages/pyfr/backends/base/makoutil.py",
line 117, in kernel
body = capture(context, context['caller'].body)
File
"/home/ginn/.local/lib/python3.5/site-packages/mako/runtime.py", line
713, in capture
callable_(*args, **kwargs)
File "memory:0x7f59b6bcea20", line 55, in body
TypeError: 'Undefined' object is not subscriptable
Regards,
Will
--
You received this message because you are subscribed to the Google
Groups "PyFR Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.