question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in openFeather(path) : Invalid: Not a feather file

See original GitHub issue

When exporting the database to feather format, e.g. via

$ abc-export --db test.db --out test.feather --format feather --generation all

and importing in R via

> library('feather')
> data = read_feather('/tmp/test.feather')

we get

Error in openFeather(path) : Invalid: Not a feather file

this happens only for some versions, e.g. pyabc 0.10.3, pandas 1.0.4, R 3.6.3.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nbungicommented, Dec 2, 2020

Here is a work-around, as I encounter this issue even though I am using the latest arrow(2.0.0)/feather(0.3.5) packages in R. Using pyarrow(2.0.0) one can read and rewrite the feather file in “version 1”, which is then readable in R. import pyarrow.feather as feather feather_db = feather.read_feather('my_db.feather') feather.write_feather(feather_db, 'my_db_v1.feather', version=1)

0reactions
yannikschaeltecommented, Nov 26, 2021

The feather format appears to be somewhat cumbersome, with different tools implementing/supporting different versions etc… Not sure what lead to this error, but just to recapitulate a few options:

  • As pointed out above by @nbungi , you can convert to version 1 post-hoc. Alternatively, you can also programmatically extract the database in https://github.com/ICB-DCM/pyABC/blob/main/pyabc/storage/export.py#L83 (this is the function called by abc-export) and then apply pandas.to_feather(filename, version=1).
  • When importing in R, at least either feather::read_feather or arrow::read_feather can be used, with the latter in particular for version 1 exports.
Read more comments on GitHub >

github_iconTop Results From Across the Web

R cannot read Python Pandas dataframe saved in feather format
But R always throws the error "Error in openFeather(path): Invalid: Not a feather file Traceback: read_feather("./aFolder/dfwin.feather") ...
Read more >
Leo Kiernan on Twitter: "If anyone has got stuck using #feather ...
If anyone has got stuck using #feather files to work across ... the error "Error in openFeather(path): Invalid: Not a feather file Traceback:...
Read more >
Developers - Another CRAN release needed: not compatible with ...
The current CRAN feather package is saying valid feather files are not valid because the current CRAN arrow package is ahead of it....
Read more >
Feather File Format — Apache Arrow v10.0.1
Feather is a portable file format for storing Arrow tables or data frames (from languages like Python or R) that utilizes the Arrow...
Read more >
Read_feather() function error - Intro to Machine Learning (2018)
pd.read_feather('/home/hamede/fastai/data/tmp/bulldozers-raw') ... python3.6/site-packages/pandas/io/feather_format.py in read_feather(path, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found