[yt-users] YT-3.0 - quick question - teething problems....

Britton Smith brittonsmith at gmail.com
Mon Sep 15 03:40:32 PDT 2014


Hi John,

Now that the main import in the recipes has changes from "from yt.mods
import *" to "import yt", all of those things that used to be in the main
namespace are now in the yt namespace.  If you make it "yt.ProfilePlot",
you should be fine.

Only slightly related, but probably worth mentioning, to run in parallel
when using "import yt", you will want to put "yt.enable_parallelism()"
after the import instead of giving the --parallel flag on the command line.

Britton

On Mon, Sep 15, 2014 at 10:56 AM, John Regan <johnanthonyregan at gmail.com>
wrote:

> Hi All,
>
> I'm having some teething problems with 3.0.
> It seems that I have a conflict somewhere but I can't see where. For
> example I have a very simple script which is doing weird things
>
> #Simple simple script
> import yt
> filename = "....../RD0000/RD0000"
> ds = yt.load(filename)
>
>
> This fails with:
>
> File "test.py", line 6, in <module>
>     ds = yt.load(filename)
> AttributeError: 'module' object has no attribute 'load'
>
> If instead I change the script to be:
>
> #Simple simple script
> from yt.mods import *
> filename = "......../RD0000/RD0000"
> ds = load(filename)
> sp = ds.h.sphere('max', (10, 'kpc'))
> prof1d = ProfilePlot(sphere, "radius", "H2I_Fraction")
>
> This now loads the file but fails on:
>  File "test.py", line 9, in <module>
>     prof1d = ProfilePlot(sphere, "radius", "H2I_Fraction")
> NameError: name 'ProfilePlot' is not defined
>
>
> Any ideas what's happening here?
>
> Cheers,
> John
>
>
> (yt-x86_64)[regan at taito-login3 RT]$ yt instinfo
>
> yt module located at:
>     /homeappl/home/regan/appl_taito/YT/Dev-3.0/yt-3.0
>
> The current version of the code is:
>
> ---
> 38fff02747ca
> ---
>
> This installation CAN be automatically updated.
> yt dependencies were last updated on
> Mon Sep 15 12:40:51 EEST 2014
>
>
> (yt-x86_64)[regan at taito-login3 RT]$ which pyyt
> /homeappl/home/regan/appl_taito/YT/Dev-3.0/yt-3.0/doc/yt-x86_64/bin/pyyt
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140915/38bc287e/attachment.htm>


More information about the yt-users mailing list