Skip to content

DataFrame msgpack objects written from linux cannot be read on windows #10732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ruidc opened this issue Aug 3, 2015 · 14 comments · Fixed by #10743
Closed

DataFrame msgpack objects written from linux cannot be read on windows #10732

ruidc opened this issue Aug 3, 2015 · 14 comments · Fixed by #10743
Labels
Milestone

Comments

@ruidc
Copy link
Contributor

ruidc commented Aug 3, 2015

eg. on linux:

df2 = pandas.DataFrame([['100']], index=[1], columns=['v'])
df2.to_msgpack(r"/mnt/C/temp/p2.msgpack")

then on windows:

df = pandas.read_msgpack(r"C:\temp\p2.msgpack")
ValueError: Shape of passed values is (1, 1), indices imply (1, 2)
@jreback
Copy link
Contributor

jreback commented Aug 3, 2015

pls show versions. This IS tested in master for cross-platform compat. Its possible that you are hitting an old bug.

@jreback jreback added the Msgpack label Aug 3, 2015
@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

0.16.2 tested

@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

and 0.14.2

@jreback
Copy link
Contributor

jreback commented Aug 3, 2015

pls try on master.

@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

where is pandas nightly these days?

@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

ah, found it, but stale for a year

@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

that's going to make it difficult for me to test windows reading.

@jreback
Copy link
Contributor

jreback commented Aug 3, 2015

hmm, this is only partially working, will mark as a bug.

@jreback
Copy link
Contributor

jreback commented Aug 3, 2015

cc @kawochen want to have a look

The reads cross platform work but are just returning a byte stream, so the tests don't fail. odd.
Every item is a KeyError, so need to add a check that we match certain items.

@jreback jreback added the Bug label Aug 3, 2015
@jreback jreback added this to the 0.17.0 milestone Aug 3, 2015
@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

it seems to be an issue between the index being picked up as dtype np.int32 on windows vs np.int64 on linux but i'm well out of my depth trying to dig into this

@kawochen
Copy link
Contributor

kawochen commented Aug 3, 2015

OK I will take a look, but the cross platform issue itself should have been fixed on master already in pandas.io.packers.dtype_for.

@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

do you mean b0c14c1 ? can you reproduce my problem above?
If you can no longer reproduce since your fixes i'll have to find/merge all the related fixes as we need to still run 0.14.2 for compatibility reasons

@jreback
Copy link
Contributor

jreback commented Aug 3, 2015

@kawochen yes I think they are fixed on same-platform reading, but the cross-platform is returning odd results (and the tests dont catch this).

@ruidc If you have compat with 0.14.2 you are on your own. (it should work, and their are not too many fixes, but that will be tricky)

@ruidc
Copy link
Contributor Author

ruidc commented Aug 3, 2015

... and actually seems to not just be the index, for some larger test cases, happens on the data too. Again forcing int64 dtype on the windows side seems to fix it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants