[yt-users] error info "TypeError: unhashable type: 'list'" with FLASH check point data

Ji Suoqing jisuoqing at gmail.com
Sat Jul 7 22:42:23 PDT 2012


Hi Nathan,

Sorry for my confusion too...

Thanks. I've installed the latest version:

(yt-x86_64)[jisuoqing at hpcmanage jisuoqing]$ yt instinfo

yt module located at:
    /aphelion/jisuoqing/yt-x86_64/src/yt-hg
The supplemental repositories are located at:
    /aphelion/jisuoqing/yt-x86_64/src/yt-supplemental

The current version of the code is:

---
2cdcd4e65129 (yt) tip
---

This installation CAN be automatically updated.
Updated successfully.


However this time ANY FLASH data will encounter error... (both check point file and plot file, and both with and without magnetic field):

>>> from yt.mods import *
>>> pf=load('merger_hdf5_chk_0000')
yt : [WARNING  ] 2012-07-08 09:43:30,067 integer runtime parameter checkpointfilenumber overwrites a simulation scalar of the same name
yt : [WARNING  ] 2012-07-08 09:43:30,067 integer runtime parameter plotfilenumber overwrites a simulation scalar of the same name
yt : [INFO     ] 2012-07-08 09:43:30,073 Parameters: current_time              = 0.00074416
yt : [INFO     ] 2012-07-08 09:43:30,073 Parameters: domain_dimensions         = [64 32  1]
yt : [INFO     ] 2012-07-08 09:43:30,073 Parameters: domain_left_edge          = [  0.00000000e+00  -6.55360000e+09   0.00000000e+00]
yt : [INFO     ] 2012-07-08 09:43:30,073 Parameters: domain_right_edge         = [  2.62144000e+10   6.55360000e+09   1.74532925e-02]
yt : [INFO     ] 2012-07-08 09:43:30,073 Parameters: cosmological_simulation   = 0.0
>>> for field in pf.h.field_list: print field
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 188, in hierarchy
    self, data_style=self.data_style)
  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/frontends/flash/data_structures.py", line 74, in __init__
    AMRHierarchy.__init__(self,pf,data_style)
  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 71, in __init__
    self._parse_hierarchy()
  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/frontends/flash/data_structures.py", line 110, in _parse_hierarchy
    self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
ValueError: operands could not be broadcast together with shapes (232,2) (232,3) 


Best wishes,
Suoqing


在 2012-7-8,上午1:21, Nathan Goldbaum 写道:

> Hi Suoqing,
> 
> Sorry about the name confusion.
> 
> Can you try switching over to the main development branch to see if the bug has been fixed since the last release?
> 
> We will be coming out with a new release soon and the development repository should be very stable for day-to-day use.  Most of the developers use the development version on a day-to-day basis.
> 
> Probably the easiest way to switch is to run the development version of the install script:
> 
> $ wget http://hg.yt-project.org/yt/raw/yt/doc/install_script.sh
> $ bash install_script.sh
> 
> And follow the on-screen instructions.
> 
> If you have trouble switching to the development branch please let us know.
> 
> Cheers,
> 
> Nathan
> 
> On Jul 7, 2012, at 9:58 PM, Nathan Goldbaum wrote:
> 
>> Hi Ji,
>> 
>> Can you let us know the output of the following command:
>> 
>> $ yt instinfo
>> 
>> Also is this for flash2.5, 3, or 4?  Is this for data produced using the unsplit solver, the 8-wave solver, or some other MHD solver?
>> 
>> Thanks for your help, we'll try to sort this out for you :)
>> 
>> Cheers,
>> 
>> Nathan Goldbaum
>> On Jul 7, 2012, at 9:50 PM, Ji Suoqing wrote:
>> 
>>> Hi all,
>>> 
>>> I've always been using YT to analyze FLASH data (plot file and check point file), and it works well. 
>>> 
>>> However, recently I have added magnetic field into FLASH, so the check point file contains more index: MAGX, MAGY, MAGZ, MAGP, etc. And if I use YT to deal with check point file, error will occur. Say:
>>> 
>>>>>> pf=load('merger_hdf5_chk_0000')
>>> yt : [WARNING  ] 2012-07-08 08:30:20,419 Setting 1.0 in code units to be 1.0 cm
>>> yt : [WARNING  ] 2012-07-08 08:30:20,419 No time units.  Setting 1.0 = 1 second.
>>> yt : [INFO     ] 2012-07-08 08:30:20,419 Parameters: current_time              = 0.0
>>> yt : [INFO     ] 2012-07-08 08:30:20,419 Parameters: domain_dimensions         = [64 64  4]
>>> yt : [INFO     ] 2012-07-08 08:30:20,419 Parameters: domain_left_edge          = [  0.00000000e+00  -6.55360000e+09   0.00000000e+00]
>>> yt : [INFO     ] 2012-07-08 08:30:20,420 Parameters: domain_right_edge         = [  2.62144000e+10   6.55360000e+09   1.74532925e-02]
>>> yt : [INFO     ] 2012-07-08 08:30:20,420 Parameters: cosmological_simulation   = 0.0
>>> yt : [WARNING  ] 2012-07-08 08:30:20,420 Setting 1.0 in code units to be 1.0 cm
>>> yt : [WARNING  ] 2012-07-08 08:30:20,420 No time units.  Setting 1.0 = 1 second.
>>> 
>>>>>> for field in pf.h.field_list: print field
>>> ... 
>>> yt : [INFO     ] 2012-07-08 08:30:35,531 Adding unknown field dens to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field divb to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field eint to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field ener to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field fspd to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field gamc to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field game to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field gpol to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,532 Adding unknown field gpot to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field magp to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field magx to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field magy to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field magz to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field pres to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field temp to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field velx to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field vely to list of fields
>>> yt : [INFO     ] 2012-07-08 08:30:35,533 Adding unknown field velz to list of fields
>>> Traceback (most recent call last):
>>> File "<stdin>", line 1, in <module>
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 172, in hierarchy
>>>  self, data_style=self.data_style)
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/frontends/flash/data_structures.py", line 73, in __init__
>>>  AMRHierarchy.__init__(self,pf,data_style)
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 83, in __init__
>>>  self._setup_unknown_fields()
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 146, in _setup_unknown_fields
>>>  ff = self.parameter_file.field_info.pop(field, None)
>>> TypeError: unhashable type: 'list'
>>> 
>>> By the way, YT still works fine with plot file in this case.
>>> 
>>> I sincerely appreciate it if you could provide me with any suggestions on this.
>>> 
>>> Best wishes,
>>> Suoqing
>>> 
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>> 
>>> 
>>> 
>> 
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> 
>> !DSPAM:10175,4ff9137994412185911607!
>> 
> 
> _______________________________________________
> 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