-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
mmap files are treated as streams but can't be read #34
Comments
Yes, I agree with what you have found. And I will look at mmap options for file_stream and file_content. Could you please evaluate get_data(... streaming=True..)? |
pyexcel-io/pyexcel_io/fileformat/_csv.py Line 269 in 1cffd9d
In case it's of interest, here's what I've done to switch from csv DictReader/DictWriter to pyexcel: mysociety/mapit.mysociety.org@3c3dd94 |
I see you used iget_records and that is OK. "streaming=True" is passed and kept by iget_* and isave_*. odfpy and ezodf both read file fully into memory. However, pyexcel-odsr, a strip-down and ods only version of messytable. If you need both pyexcel-ods and pyexcel-odsr installed, you could specify iget_records(...library='pyexcel-odsr'). |
please verify using pyexcel-io 0.3.4 |
xlrd
can operate on mmap files, so it would be useful to be able to pass in one to pyexcel, e.g.isstream
is true for an mmap because it has a read function, and so even though I passed infile_content
, pyexcel-io'sget_data
callsload_data
withfile_stream
rather thanfile_content
. But this then means that down in pyexcel-xls, eithergetvalue
is called (current release) which errors, orread
is called without argument (after pyexcel/pyexcel-xls#16 fix) which errors as mmap's read must have an argument.My aim is to not have to read in file contents in one go at all anywhere, and for pyexcel-xls/xlrd, mmap appears to be the only way (and #33 would fix it for CSV I think). What I have done is create an
mmap
subclass that does not have a read function, which then means, pyexcel-io passes file_content through to pyexcel-xls and thus xlrd.The text was updated successfully, but these errors were encountered: