Comments (8)
I am getting the same error. My code was working fine two weekends ago. Today I tried it on the same compound as two weeks ago and this error came up. I would like to know what is going on as well here.
from chembl_webresource_client.
Hello,
Did you check if the api hade any problems? Do you have a minimum reproducible example? It would be a lot better if you copied and pasted the code and error message as text instead of a screen shot. For one, it's possible to copy and paste to test instead of typing everything manually. Also, you have cut the error message, did it include anymore specifics on the server error?
I don't have the library installed on my main computer at the moment so I can't easily try but the API seems to work. (Checkable at https://www.ebi.ac.uk/chembl/api/data/docs)
from chembl_webresource_client.
Here is the code I am running:
from chembl_webresource_client.new_client import new_client
Here is the error:
`Exception Traceback (most recent call last)
Input In [1], in <cell line: 1>()
---> 1 from chembl_webresource_client.new_client import new_client
File ~\anaconda3\lib\site-packages\chembl_webresource_client\new_client.py:65, in
60 return client
63 #-----------------------------------------------------------------------------------------------------------------------
---> 65 new_client = client_from_url(Settings.Instance().NEW_CLIENT_URL + '/spore')
File ~\anaconda3\lib\site-packages\chembl_webresource_client\new_client.py:27, in client_from_url(url, base_url)
25 res = requests.get(url)
26 if not res.ok:
---> 27 raise Exception('Error getting schema from url {0} with status {1} and msg {2}'.format(url, res.status_code, res.text))
28 schema = res.json()
29 if 'base_url' not in schema:
Exception: Error getting schema from url https://www.ebi.ac.uk/chembl/api/data/spore with status 500 and msg <!doctype html>
<script> // Detect if JS is on and swap vf-no-js for vf-js on the html element (function(H){H.className=H.className.replace(/\bvf-no-js\b/,'vf-js')})(document.documentElement); </script><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" media="all" href="/css/styles.css?" /> -->
<title>Error: 500 | EMBL�s European Bionformatics Institute</title>
<link rel="icon" type="image/x-icon"
<!-- Search indexing optimisations -->
<meta class="swiftype" name="what" data-type="string" content="none" />
<meta class="swiftype" name="where" data-type="string" content="EMBL-EBI" />
<!-- Descriptive meta -->
<meta name="title" content="Error: 500">
<meta name="author" content="European Bioinformatics Institute">
<meta name="robots" content="index, follow">
<meta name="keywords" content="">
<meta name="description" content="">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://www.ebi.ac.uk/info/error-pages/500-standalone/">
<meta property="og:title" content="Error: 500">
<meta property="og:description" content="">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="og:url" content="https://www.ebi.ac.uk/info/error-pages/500-standalone/">
<meta property="twitter:title" content="Error: 500">
<meta property="twitter:description" content="">
<!-- Content descriptors -->
<meta name="embl:who" content="EMBL-EBI Web Dev">
<meta name="embl:where" content="EMBL-EBI">
<meta name="embl:what" content="none">
<meta name="embl:active" content="where">
<!-- Content role -->
<meta name="embl:utility" content="10">
<meta name="embl:reach" content="0">
<!-- Page infromation -->
<meta name="embl:maintainer" content="EMBL-EBI Web Dev">
<meta name="embl:last-review" content="2021.04.01">
<meta name="embl:review-cycle" content="365">
<meta name="embl:expiry" content="never">
<!-- analytics -->
<meta name="vf:page-type" content="404;dimension1">
<!-- CSS only -->
<!-- See the EBI Header Footer docs: https://stable.visual-framework.dev/components/ebi-header-footer -->
<link rel="stylesheet" href="https://assets.emblstatic.net/vf/v2.4.5/assets/ebi-header-footer/ebi-header-footer.css" type="text/css" media="all">
<header id="masthead-black-bar" class="clearfix masthead-black-bar | ebi-header-footer vf-content vf-u-fullbleed"></header>
Error: 500
There was a technical error.
Something has gone wrong with our web server when attempting to make this page.
Unfortunately, the service you are trying to access is currently unavailable.
Please try again later.
<button type="submit" class="vf-search__button | vf-button vf-button--primary">
<span class="vf-button__text">Search</span>
</button>
</div>
</form>
<p class="vf-text-body--5 vf-u-margin__bottom--0">
Example searches: <a class="vf-link" href="/ebisearch/search.ebi?db=allebi&requestFrom=ebi_index&query=blast">blast</a>
<a class="vf-link" href="/ebisearch/search.ebi?db=allebi&query=keratin&requestFrom=ebi_index">keratin</a>
<a class="vf-link" href="/ebisearch/search.ebi?db=allebi&query=bfl1&requestFrom=ebi_index">bfl1</a>
| <a class="vf-link" href="https://www.ebi.ac.uk/ebisearch/overview.ebi/about">About EBI Search</a>
</p>
</section>
Need assistance?
Contact our support team<!-- embl global footer -->
<script src="https://assets.emblstatic.net/vf/v2.4.9/scripts/scripts.js"></script>
from chembl_webresource_client.
Sometimes it does successfully load the package but then I try to run the package over some compounds and get this below.
Code:
chembl_ids=[]
for h in range(0,len(comps)):
molecule=new_client.molecule
molS=molecule.filter(molecule_synonyms__molecule_synonym__iexact=comps[h])
if len(molS)>0:
chembl_ids.append(molS[0]['molecule_chembl_id']) # Synonym hit
else:
chembl_ids.append(0)
This is the error here:
`HttpApplicationError Traceback (most recent call last)
Input In [11], in <cell line: 2>()
3 molecule=new_client.molecule
4 molS=molecule.filter(molecule_synonyms__molecule_synonym__iexact=comps[h])
----> 5 if len(molS)>0:
6 chemblSyn.append(molS[0]['molecule_chembl_id']) # Synonym hit
7 else:
File ~\anaconda3\lib\site-packages\chembl_webresource_client\query_set.py:97, in QuerySet.len(self)
95 if not self.can_filter:
96 return 1
---> 97 return len(self.query)
File ~\anaconda3\lib\site-packages\chembl_webresource_client\url_query.py:144, in UrlQuery.len(self)
142 return
143 if not self.api_total_count:
--> 144 self.get_page()
145 return self.api_total_count
File ~\anaconda3\lib\site-packages\chembl_webresource_client\url_query.py:394, in UrlQuery.get_page(self)
392 self.logger.info('From cache: {0}'.format(res.from_cache if hasattr(res, 'from_cache') else False))
393 if not res.ok:
--> 394 handle_http_error(res)
395 if self.frmt == 'json':
396 json_data = res.json()
File ~\anaconda3\lib\site-packages\chembl_webresource_client\http_errors.py:113, in handle_http_error(request)
111 exception_class = status_to_exception.get(request.status_code, BaseHttpException)
112 if request.text:
--> 113 raise exception_class(request.url, request.text)
114 raise exception_class(request.url, request.content)
HttpApplicationError: Error for url https://www.ebi.ac.uk/chembl/api/data/molecule.json, server response: <!doctype html>
<script> // Detect if JS is on and swap vf-no-js for vf-js on the html element (function(H){H.className=H.className.replace(/\bvf-no-js\b/,'vf-js')})(document.documentElement); </script><meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" media="all" href="/css/styles.css?" /> -->
<title>Error: 500 | EMBL�s European Bionformatics Institute</title>
<link rel="icon" type="image/x-icon"
<!-- Search indexing optimisations -->
<meta class="swiftype" name="what" data-type="string" content="none" />
<meta class="swiftype" name="where" data-type="string" content="EMBL-EBI" />
<!-- Descriptive meta -->
<meta name="title" content="Error: 500">
<meta name="author" content="European Bioinformatics Institute">
<meta name="robots" content="index, follow">
<meta name="keywords" content="">
<meta name="description" content="">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://www.ebi.ac.uk/info/error-pages/500-standalone/">
<meta property="og:title" content="Error: 500">
<meta property="og:description" content="">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="og:url" content="https://www.ebi.ac.uk/info/error-pages/500-standalone/">
<meta property="twitter:title" content="Error: 500">
<meta property="twitter:description" content="">
<!-- Content descriptors -->
<meta name="embl:who" content="EMBL-EBI Web Dev">
<meta name="embl:where" content="EMBL-EBI">
<meta name="embl:what" content="none">
<meta name="embl:active" content="where">
<!-- Content role -->
<meta name="embl:utility" content="10">
<meta name="embl:reach" content="0">
<!-- Page infromation -->
<meta name="embl:maintainer" content="EMBL-EBI Web Dev">
<meta name="embl:last-review" content="2021.04.01">
<meta name="embl:review-cycle" content="365">
<meta name="embl:expiry" content="never">
<!-- analytics -->
<meta name="vf:page-type" content="404;dimension1">
<!-- CSS only -->
<!-- See the EBI Header Footer docs: https://stable.visual-framework.dev/components/ebi-header-footer -->
<link rel="stylesheet" href="https://assets.emblstatic.net/vf/v2.4.5/assets/ebi-header-footer/ebi-header-footer.css" type="text/css" media="all">
<header id="masthead-black-bar" class="clearfix masthead-black-bar | ebi-header-footer vf-content vf-u-fullbleed"></header>
Error: 500
There was a technical error.
Something has gone wrong with our web server when attempting to make this page.
Unfortunately, the service you are trying to access is currently unavailable.
Please try again later.
<button type="submit" class="vf-search__button | vf-button vf-button--primary">
<span class="vf-button__text">Search</span>
</button>
</div>
</form>
<p class="vf-text-body--5 vf-u-margin__bottom--0">
Example searches: <a class="vf-link" href="/ebisearch/search.ebi?db=allebi&requestFrom=ebi_index&query=blast">blast</a>
<a class="vf-link" href="/ebisearch/search.ebi?db=allebi&query=keratin&requestFrom=ebi_index">keratin</a>
<a class="vf-link" href="/ebisearch/search.ebi?db=allebi&query=bfl1&requestFrom=ebi_index">bfl1</a>
| <a class="vf-link" href="https://www.ebi.ac.uk/ebisearch/overview.ebi/about">About EBI Search</a>
</p>
</section>
Need assistance?
Contact our support team<!-- embl global footer -->
<script src="https://assets.emblstatic.net/vf/v2.4.9/scripts/scripts.js"></script>
from chembl_webresource_client.
@juanfmx2 @nclopezo could you please take a look at it?
from chembl_webresource_client.
It's working perfectly fine for me both through the package and directly on the API docs page. Most likely they had some problems on the API side. The error messages certainly indicates that. You get a 500-error from the API. So I wouldn't say it's a bug with the client package.
from chembl_webresource_client.
@fredrikw @Acario @meghanakaranam1 sorry for the late response, we were having intermittent issues with our infrastructure, but the service should be stable now. Please let me know if you are experiencing any other issues.
from chembl_webresource_client.
Thanks for the help @fredrikw @juanfmx2!
from chembl_webresource_client.
Related Issues (20)
- .filter for different names in "document_journal" column HOT 1
- Query hangs after reaching specific entry HOT 1
- Error for url https://www.ebi.ac.uk/chembl/api/data/activity.json, server response: <!doctype html> HOT 6
- Mechanism results do not match what is on the website HOT 3
- Isomeric SMILES string
- Problem with unichem.structure HOT 4
- Http Application error HOT 5
- Querying by inchi
- new_client is failing to import from chembl_webresource_client HOT 1
- Assay offsets and limit HOT 2
- How do I retrieve the Unichem Cross references as a dictionary/list for a CHEMBL compound?
- Fail to import new_client due to API problem HOT 5
- Fixed
- Space between words of the query
- confidence score
- Error for url
- ChEMBL webresourse client issue
- status 500 with chembl_webresource_client.new_client
- Problem of parallelized big data mining via batch chunks
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 chembl_webresource_client.