<div dir="ltr">Nathan<div><br></div><div>Thanks for the pointer to field.py; yes, that was the problem.</div><div><br></div><div>I've already encountered (and locally fixed) a few other problems with _skeleton. My plan was to try to correct these officially after I have something working, so that I can be sure that my corrections are actually correct.</div><div><br></div><div>-erik</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 12:36 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sun, Nov 1, 2015 at 9:17 AM, Erik Schnetter <span dir="ltr"><<a href="mailto:schnetter@gmail.com" target="_blank">schnetter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I'm developing a new frontend for yt <<a href="https://bitbucket.org/eschnett/yt" target="_blank">https://bitbucket.org/eschnett/yt</a>>. I am currently encountering this error <<a href="http://pastebin.com/EYauU1rv" target="_blank">http://pastebin.com/EYauU1rv</a>>.</div><div><br></div><div>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.</div></div></blockquote><div><br></div></span><div>Hi Erik,</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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 (<a href="https://bitbucket.org/eschnett/yt/commits/7c7296f05b0b521c33067e94e00996063e43ade0#Lyt/frontends/simulationio/fields.pyT38" target="_blank">https://bitbucket.org/eschnett/yt/commits/7c7296f05b0b521c33067e94e00996063e43ade0#Lyt/frontends/simulationio/fields.pyT38</a>) but it looks like the other frontends expect a signature like this:</div><div><br></div><div>def __init__(self, ds, field_list):<br></div><div><br></div><div>(see e.g. the Enzo frontend, <a href="https://bitbucket.org/yt_analysis/yt/src/60428e2d8aad1b87ca57ef6eb3c2fa53fed70dad/yt/frontends/enzo/fields.py?at=yt&fileviewer=file-view-default#fields.py-106" target="_blank">https://bitbucket.org/yt_analysis/yt/src/60428e2d8aad1b87ca57ef6eb3c2fa53fed70dad/yt/frontends/enzo/fields.py?at=yt&fileviewer=file-view-default#fields.py-106</a>)</div><div><br></div><div>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.</div><div><br></div><div>Best,</div><div><br></div><div>Nathan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><div dir="ltr"><span><font color="#888888"><div><br></div><div>-erik</div><div><br></div>-- <br><div>Erik Schnetter <<a href="mailto:schnetter@gmail.com" target="_blank">schnetter@gmail.com</a>> <a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a><br></div>
</font></span></div>
<br></span>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Erik Schnetter <<a href="mailto:schnetter@gmail.com" target="_blank">schnetter@gmail.com</a>> <a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a><br></div>
</div>