Giter Site home page Giter Site logo

Comments (7)

saketkc avatar saketkc commented on July 20, 2024

Thanks for catching this! I can confirm that this is a bug.
cc @bscrow

from pysradb.

bscrow avatar bscrow commented on July 20, 2024

I could not reproduce this bug in Python 3.7 (see colab example) where the query "cancer human" returns no search results with a message as expected:

No results found for the following search query: {'query': 'CANCER HUMAN', 'accession': None, 'organism': None, 'layout': None, 'mbases': None, 'publication_date': None, 'platform': None, 'selection': None, 'source': None, 'strategy': None, 'title': None}

The traceback suggests an error when calling r.json() on an empty query result. Can I check what version of requests library are you using?

from pysradb.

xapple avatar xapple commented on July 20, 2024

Version '2.27.1' which is the latest at time of writing. But I'm on python 3.9.9, so I'm going to guess something changed with the built-in json module between versions.

from pysradb.

saketkc avatar saketkc commented on July 20, 2024

I just tried this with Python 3.10.2 and requests 2.27.1 and was unable to replicate as well:

$ python
Python 3.10.2 | packaged by conda-forge | (main, Feb  1 2022, 19:29:00) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysradb.search import EnaSearch
>>> instance = EnaSearch(query="cancer human")
>>> instance.search()
No results found for the following search query:
 {'query': 'CANCER HUMAN', 'accession': None, 'organism': None, 'layout': None, 'mbases': None, 'publication_date': None, 'platform': None, 'selection': None, 'source': None, 'strategy': None, 'title': None}
>>> df = instance.get_df()
>>> print(df)
Empty DataFrame
Columns: []
Index: []

from pysradb.

saketkc avatar saketkc commented on July 20, 2024

Can you try again @xapple? Not sure if it might be due to an intermittent connectivity issue?

from pysradb.

xapple avatar xapple commented on July 20, 2024

I installed and upgraded the latest pythons on my computer:

  • Python 3.9.10
  • Python 3.10.2

I can confirm that the problem is present only in 3.9 series and not in 3.10

from pysradb.

saketkc avatar saketkc commented on July 20, 2024

Indeed, we see this on the tests also: https://github.com/saketkc/pysradb/runs/5465673995?check_suite_focus=true#step:7:76. But looks like a recent problem (like a couple of weeks old), since the earlier tests pass with 3.9: https://github.com/saketkc/pysradb/runs/5309144937?check_suite_focus=true

from pysradb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.