CLN: Exception in pickle loading by jbrockmendel · Pull Request #28645 · pandas-dev/pandas (original) (raw)
Well, the docs is just code that is ran with the latest pandas. So there is a line of code that is working on master and failing with this branch (the pytables thing you see at the end is something else (ignored), you need to scroll up in the logs to find the actual error).
It's this (assuming 'pandas' is your local cloned repo):
In [7]: pd.read_pickle('pandas/doc/data/fx_prices')
Out[7]:
EU FR GR IT
DATE
1980-01-01 NaN 4.0405 1.7246 804.74
1980-02-01 NaN 4.0963 1.7482 810.01
1980-03-01 NaN 4.3149 1.8519 860.13
1980-04-01 NaN 4.3536 1.8776 876.41
1980-05-01 NaN 4.1808 1.7913 843.23
... ... ... ... ...
2012-01-01 1.2910 NaN NaN NaN
2012-02-01 1.3238 NaN NaN NaN
2012-03-01 1.3208 NaN NaN NaN
2012-04-01 1.3160 NaN NaN NaN
2012-05-01 1.2806 NaN NaN NaN
[389 rows x 4 columns]
So we have a pickle file that reads fine on master, and the changes in this branch broke that.
Now, I assume the pickle file was written with pandas 0.8.0, so we don't guarantee support for that anymore, so it might not be a problem that you are breaking it (although t might be useful to understand why, to be sure it will not be a problem for more recent versions of pandas)
The error on this branch is:
>>>-------------------------------------------------------------------------
Exception in /home/vsts/work/1/s/doc/source/whatsnew/v0.8.0.rst at block ending on line None
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-99c214b0f98c> in <module>
----> 1 fx = pd.read_pickle('data/fx_prices')
~/work/1/s/pandas/io/pickle.py in read_pickle(path, compression)
156 # We want to silence any warnings about, e.g. moved modules.
157 warnings.simplefilter("ignore", Warning)
--> 158 return pickle.load(f)
159 except excs_to_catch:
160 # e.g.
TypeError: _reconstruct: First argument must be a sub-type of ndarray
<<<-------------------------------------------------------------------------