On Sun, Nov 1, 2015 at 9:17 AM, Erik Schnetter email@example.com wrote:
I don't know what causes this error. The error message mentions an __init__ function, but I don't know which __init__ function this is, nor whether the problem is in the caller or the callee. I'd be grateful for any feedback.
The easiest way to debug issues like this is to use a python debugger. I prefer ipdb, which has nice integration with IPython, including tab completions. Others like pudb. There's also pdb, which is part of the python standard library. All of these debuggers have a gdb-like command-line interface, allowing printing out backtraces, inspecting variables, and stepping through code. Both ipdb and pudb can be installed via pip.
In any case, using a debugger, you would put a breakpoint above line 371 of yt/data_objects/static_output.py by (for ipdb) inserting "import ipdb; ipdb.set_trace()". You can also add breakpoints without altering the code, but I tend to find that it's the least frictionless way to interact with python debuggers. YMMV and others might have other suggestions.
For this specific error, I would print out what self._field_info_class is. Without running the code myself and checking in a debugger, I would guess it's your frontend-specific subclass of FieldInfoContainer. In particular, it looks like your stub implementation of SimulationIOFieldInfo only takes two arguments ( https://bitbucket.org/eschnett/yt/commits/7c7296f05b0b521c33067e94e00996063e...) but it looks like the other frontends expect a signature like this:
def __init__(self, ds, field_list):
(see e.g. the Enzo frontend, https://bitbucket.org/yt_analysis/yt/src/60428e2d8aad1b87ca57ef6eb3c2fa53fed... )
Looking at the skeleton frontend, it looks like the bug actually originates there in the template for fields.py. It would be an excellent first pull request to yt if you wanted to fix this bug in the skeleton frontend. You should probably do that in a separate bookmark from your Cactus frontend work so only the bugfix comes in. You would then merge with mainline yt once the bugfix to the skeleton frontend gets merged. I'd be happy to walk you through any aspect of contributing to yt if you encounter trouble or have questions.
-- Erik Schnetter firstname.lastname@example.org http://www.perimeterinstitute.ca/personal/eschnetter/
yt-dev mailing list email@example.com http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org