From 88ce0f4c44d23a575a99cfe5e4fb7db6ff0cc5d4 Mon Sep 17 00:00:00 2001 From: Stella <30465823+stellaprins@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:49:37 +0000 Subject: [PATCH] store cache and sett Agg for matplotlib to prevent matplotlib windows opening --- BioModels/parse_biomodels.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BioModels/parse_biomodels.py b/BioModels/parse_biomodels.py index d5b0a6d..b14bf04 100755 --- a/BioModels/parse_biomodels.py +++ b/BioModels/parse_biomodels.py @@ -24,6 +24,8 @@ sys.path.append("..") import utils +matplotlib.use('Agg') #prevent matplotlib from trying to open a window + API_URL: str = "https://www.ebi.ac.uk/biomodels" out_format="json" @@ -181,7 +183,7 @@ def main(): #caching is used to prevent the need to download the same responses from the remote server multiple times during testing #mode="off" to disable caching, "store" to wipe and store fresh results, "reuse" to use the stored cache - cache = utils.RequestCache(mode="auto",direc="cache") + cache = utils.RequestCache(mode="store",direc="cache") #accumulate results in columns defined by keys which correspond to the local variable names to be used below #to allow automated loading into the columns