[yt-users] development environment issue

Nathan Goldbaum nathan12343 at gmail.com
Sun Dec 23 15:02:30 PST 2012


Hi Sam,

It difficult to say exactly what's going wrong without looking at how 
you set up your ARTStaticOutput class.

A good way to figure out what's going wrong would be to place a pdb call 
in the place where the static output registry is created: 
http://paste.yt-project.org/show/3028/

When I do so, I get the following backtrace for the EnzoStaticOutput class:

-> from yt.mods import *
/Users/goldbaum/Documents/yt-x86_64/src/yt-3.0-hg/yt/mods.py(70)<module>()
-> from yt.frontends.enzo.api import \
/Users/goldbaum/Documents/yt-x86_64/src/yt-3.0-hg/yt/frontends/enzo/api.py(31)<module>()
-> from .data_structures import \
/Users/goldbaum/Documents/yt-x86_64/src/yt-3.0-hg/yt/frontends/enzo/data_structures.py(642)<module>()
-> class EnzoStaticOutput(StaticOutput):
 > 
/Users/goldbaum/Documents/yt-x86_64/src/yt-3.0-hg/yt/data_objects/static_output.py(67)__init__()
-> output_type_registry[name] = cls

For some reason your ArtStaticOutput class is not being imported along 
with everything else in yt.mods.

Hope that was helpful.

Cheers,

Nathan

On 12/23/12 2:04 PM, Sam Leitner wrote:
> Hi yt-users,
>
> I'm having a little trouble with my script environment (for 
> yt-3.0). After installing and then "activating" a new repository 
> (python setup.py develop) I altered mods.py to include a new frontend. 
> When I then run e.g., plot from the command line, yt.mods imports 
> properly and my _is_valid script runs fine. However, when I run "load" 
> from a script my new StaticOutput class isn't found. I guess this is 
> because I have not activated my yt environment properly(?), can anyone 
> tell me what is going wrong?
>
> Thanks!
>
> Sam
>
> PS In case it is helpful: I get an error on load in convenience.py 
> because the my new StaticOutput class (artio) is not defined. Here's 
> the output if I print the c in c._is_valid .
>
> <class 'yt.frontends.enzo.data_structures.EnzoStaticOutput'>
> <class 'yt.frontends.chombo.data_structures.ChomboStaticOutput'>
> <class 'yt.data_objects.static_output.StaticOutput'>
> <class 'yt.frontends.athena.data_structures.AthenaStaticOutput'>
> <class 'yt.frontends.tiger.data_structures.TigerStaticOutput'>
> <class 'yt.frontends.nyx.data_structures.NyxStaticOutput'>
> <class 'yt.frontends.orion.data_structures.OrionStaticOutput'>
> <class 'yt.frontends.flash.data_structures.FLASHStaticOutput'>
> <class 'yt.frontends.enzo.data_structures.EnzoStaticOutputInMemory'>
> <class 'yt.frontends.ramses.data_structures.RAMSESStaticOutput'>
> <class 'yt.frontends.gdf.data_structures.GDFStaticOutput'>
> <class 'yt.frontends.castro.data_structures.CastroStaticOutput'>
> yt : [ERROR    ] 2012-12-23 14:16:08,197 Couldn't figure out output 
> type for tests/artdat/sizmbhloz-cl04SNpWRPlc30nPF-rs9_a0.9254.art
> Traceback (most recent call last):
>   File "plot.py", line 3, in <module>
>     pf = load("tests/artdat/sizmbhloz-cl04SNpWRPlc30nPF-rs9_a0.9254.art")
>   File "/Users/sleitner/repos/yt-3.0-clone/yt/convenience.py", line 
> 85, in load
>     raise YTOutputNotIdentified(args, kwargs)
>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org




More information about the yt-users mailing list