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

Unable to use caching in BioDBNet #216

Open
JoshLoecker opened this issue May 26, 2022 · 1 comment
Open

Unable to use caching in BioDBNet #216

JoshLoecker opened this issue May 26, 2022 · 1 comment

Comments

@JoshLoecker
Copy link
Contributor

Hello,
I have an example below

from bioservices import BioDBNet

net = BioDBNet(verbose=True, cache=True)

And I receive the following output

INFO    [bioservices.BioDBNet:363]:  Initialising BioDBNet service (REST)
INFO    [bioservices.BioDBNet:505]:  Using local cache /Users/joshl/Library/Application Support/bioservices/BioDBNet_bioservices_db
CRITICAL[bioservices.BioDBNet:711]:  You must install the python package: sqlite3
CRITICAL[bioservices.BioDBNet:712]:  Query unsuccesful. Maybe too slow response.
    Consider increasing it with settings.TIMEOUT attribute 30

However, the sqlite3 package is a standard installation in Python3. I am able to do the following without an error

> python3
Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:45:10) [Clang 12.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.version
'2.6.0'
>>>

Is there an additional package I need to install in order to use cache=True with BioDBNet?

Thanks for any help!

@cokelaer
Copy link
Owner

@JoshLoecker in principle, sqlite3 should be installed.
The cache=True option is used by all services including BioDBNet.
I see that you are using python3.10, which is not tested in bioservices. Maybe there is an issue related to python 3.10

The caching system is provided by the package requests_cache that most probably depends on sqlite3 and raise this warning.

You other issue is related to the fact that the response is too slow. Maybe the services was down when you tried ? Maybe the response was indeed too slow. But most probably this is a python3.10 issue

Not sure how I can help further for now. I tried to include python3.10 in the test suite but was not successful a couple of months ago. I may try again later this summer

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

2 participants