Comments (8)
Hi @nimitbhardwaj, thanks for looking into this. If you think the fix could potentially work, please do submit a pull request. The test cases for cli.py
are currently disabled, but if you submit a PR, it would be good to reinstate them along with this new test case.
from pysradb.
Thanks Simon!
I can reproduce this at my end. I think I have a fix for this that I'll update soon.
from pysradb.
is this still an issue? I ask because I received the same error when running:
pysradb search '"ribosome profiling"' | head
from pysradb.
I also get the broken pipe error.
from pysradb.
This is still an issue. Sorry, but I don't have a fix yet. As a temporary fix, you can save the output to a tsv by appending --saveto myfile.tsv
and then do a head
on the tsv.
from pysradb.
I would like to work this issue. I did some research why this issue is happening, I came to know that in file cli.py
, in function _print_save_df
, line number 33, we are printing the output what is needed to be printed. By referring stackoverflow, the Broken Pipe Error occurs because when one end of the pipe is blocked, and for our case the I/O redirection by | head
is blocking the output pipe, so the buffer of the stdout pipe overflows and is broken, this is because the head or output redirection only reads when the preceding process is completed.
Following the same question thread, I came to know that ignoring the exception is best way to do it, as at some point when the buffer is full it wont take any other byte in buffer, so it can be done by exception handling.
For this approach it is easy to code, but I want to confirm will this approach be good for our case.
from pysradb.
@saketkc ok cool I make the PR for it today and will re initiate the testcase for the same.
from pysradb.
Is this issue still open? I was thinking on the same lines as nimit, basically, this error is thrown due to the large size of the file which is being redirected through stdout to pipe. The pipe typically has a limit of ~60KB as mentioned in this answer's comment. So to make it user-friendly a hard-coded limit on the size of to_print
list (line 43 in cli.py) can be put to restrict it from printing anything out to the terminal if it crosses the threshold. When it is greater than the limit the output can be saved to a unique .tsv
file and an error message output is too large
may be displayed along with the name of tsv
file.
This approach does not exactly solve the Broken pipe
error but is merely a workaround.
@saketkc If this issue is still open, is the approach mentioned above fine? Also should I write a few test cases to test it?
from pysradb.
Related Issues (20)
- [BUG] cannot download a single experiment from command line HOT 1
- [BUG] aspera HOT 3
- [BUG] Metadata download not only for the provided accession number HOT 3
- [BUG] aspera HOT 3
- [BUG] gse-to-srp error HOT 1
- [BUG] Download error HOT 1
- [BUG] download error HOT 2
- [BUG]Downloading issue HOT 1
- fastq's URLs are empty HOT 2
- Not all attributes are being exported HOT 6
- [BUG] missing run-related entries for experiments with high number of runs
- [BUG] Metadata download only for a few run accessions, not for all the run accessions of the study HOT 4
- [BUG] srp-to-srr giving SRSs as result HOT 3
- could you expend to support European Nucleotide Archive data HOT 1
- [BUG] All arrays must be of the same length
- [ENH] geo_download_links error handling HOT 1
- Incosistencies with retrieving SRX data from different archives HOT 1
- Specific srp seems to cause metadata download to freeze
- [BUG] gse_to_srp problems HOT 2
- [BUG] Cant download using ascp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysradb.