Skip to content
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

Issue when downloading Biosample #15

Closed
jfear opened this issue Jun 1, 2017 · 1 comment
Closed

Issue when downloading Biosample #15

jfear opened this issue Jun 1, 2017 · 1 comment

Comments

@jfear
Copy link
Owner

jfear commented Jun 1, 2017

When downloading biosample it appears to download an empty file. Need to add try to the check xml script.

2017-05-31 19:12:26,762 - INFO - Querying BioSample: with 25,487 ids
2017-05-31 19:12:26,762 - INFO - Saving to cache: /home/fearjm/tmp/.cache/sra2mongo/biosample
2017-05-31 19:12:42,466 - INFO - There are 25,487 records.
2017-05-31 19:12:42,476 - INFO - Downloading BioSample documents
2017-05-31 19:12:42,476 - INFO - Saving to cache: /home/fearjm/tmp/.cache/sra2mongo/biosample
killing process with pid: 8972
Traceback (most recent call last):
  File "/home/fearjm/miniconda3/envs/test_sra2mongo/bin/sra2mongo", line 11, in <module>
    load_entry_point('sramongo', 'console_scripts', 'sra2mongo')()
  File "/home/fearjm/devel/sramongo/sramongo/sra2mongo.py", line 441, in main
    raise err
  File "/home/fearjm/devel/sramongo/sramongo/sra2mongo.py", line 403, in main
    fetch_ncbi(query, cache, runinfo_retmode=None, db='biosample')
  File "/home/fearjm/devel/sramongo/sramongo/sra2mongo.py", line 227, in fetch_ncbi
    if (cache_xml is not None) & (catch_xml_error(StringIO(cache_xml)) is False):
  File "/home/fearjm/devel/sramongo/sramongo/sra2mongo.py", line 205, in catch_xml_error
    tree = ElementTree.parse(xml)
  File "/home/fearjm/miniconda3/envs/test_sra2mongo/lib/python3.5/xml/etree/ElementTree.py", line 1195, in parse
    tree.parse(source, parser)
  File "/home/fearjm/miniconda3/envs/test_sra2mongo/lib/python3.5/xml/etree/ElementTree.py", line 596, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
@jfear
Copy link
Owner Author

jfear commented Jun 1, 2017

I think I have addressed this in PR #14.

@jfear jfear closed this as completed Jul 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant