[yt-users] issue with reading pickle files with yt-conda

Nathan Goldbaum nathan12343 at gmail.com
Fri Dec 22 08:15:43 PST 2017


Hi Jason,

I was able to load the pickle file after making a small modification to yt:

https://github.com/yt-project/yt/pull/1656

If you have any other old pickle files that don't load properly after this
pull request I'd be happy to iterate with you on that.

-Nathan

On Fri, Dec 22, 2017 at 8:03 AM, Jason Tumlinson <tumlinson at stsci.edu>
wrote:

> Hi Nathan,
>
> Here is a link to the possibly stale pickle:
>
> https://www.dropbox.com/s/8w1guhcc8hlnpvm/frbx_1kpc_
> 500kpc_z0_SiIII_1883.cpkl?dl=0
>
> Hope we can find a solution.
> Thanks
> JT
>
>
> On Dec 22, 2017, at 8:55 AM, Nathan Goldbaum <nathan12343 at gmail.com>
> wrote:
>
> Any chance you can share the offending file?
>
> Unfortunately the answer is probably no if the file is sufficiently old.
>
> On Fri, Dec 22, 2017 at 5:57 AM Jason Tumlinson <tumlinson at stsci.edu>
> wrote:
>
>> Hi,
>> I have need for reading some pickle files containing yt array outputs.
>> The files were created by someone else a while ago so I don’t know much
>> about the conditions of their creation. When trying to open them I get the
>> error below.
>>
>> I am asking here because the comment on line 1384 of the traceback seems
>> to point at a yt issue, not something in the file itself. Has anyone
>> encountered this? Is there a workaround?
>>
>> Thanks
>> JT
>>
>>
>>
>>
>>
>> In [*3*]: f = open(‘file.cpkl', 'rb')
>>
>> In [*4*]: cPickle.load(f)
>> ------------------------------------------------------------
>> ---------------
>> TypeError                                 Traceback (most recent call
>> last)
>> <ipython-input-4-1f99de24e8dc> in <module>()
>> ----> 1 cPickle.load(f)
>>
>> /Users/tumlinson/yt-conda/lib/python2.7/site-packages/yt/
>> units/yt_array.pyc in __setstate__(self, state)
>> *   1381*         """
>> *   1382*         super(YTArray, self).__setstate__(state[1:])
>> -> 1383         unit, lut = state[0]
>> *   1384*         # need to fix up the lut if the pickle was saved prior
>> to PR #1728
>> *   1385*         # when the pickle format changed
>>
>> TypeError: 'int' object is not iterable
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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/20171222/c0cebec8/attachment-0002.html>


More information about the yt-users mailing list