EBISPOT / gwas-solr-slim

1 stars 0 forks source link

trait doc generation fix #44

Open jdhayhurst opened 2 years ago

jdhayhurst commented 2 years ago

Occasionally, and not repeatably, the following exception is raised during the trait doc generation:

HTTPConnectionPool(host='www-proxy.ebi.ac.uk', port=3128): Max retries exceeded with url: http://www.ebi.ac.uk/ols/api/ontologies/efo/terms/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0008221 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPConnection object at 0x15055f9ff550>: Failed to establish a new connection: [Errno -2] Name or service not known'))

This is in the errors:

Getting EFO term - hierarchicalDescendants mapping: 100%|██████████| 7196/7196 [17:21<00:00,  6.91it/s]
Get EFO/Mapped trait data:  26%|██▌       | 1859/7196 [06:33<18:48,  4.73it/s]
Traceback (most recent call last):
  File "/gwas-utils/bin/generate-solr-docs", line 10, in <module>
    sys.exit(main())
  File "/gwas-utils/lib/python3.7/site-packages/scripts/generate_solr_docs.py", line 155, in main
    document_data = dispatcher[doc](db_object.connection, limit, test)
  File "/gwas-utils/lib/python3.7/site-packages/scripts/generate_solr_docs.py", line 20, in trait_data
    return trait.get_trait_data(connection)
  File "/gwas-utils/lib/python3.7/site-packages/scripts/document_types/trait.py", line 151, in get_trait_data
    if not ols_term_data['iri'] == None:
TypeError: 'NoneType' object is not subscriptable
sprintell commented 2 years ago

Investigate what is been retrived from OLS

@sprintell please discuss with OLs team on the possibility of providing and endpoint for bulk retrieval of what is been retrieved in this issues

ljwh2 commented 1 year ago

@ala-ebi @sajo-ebi @sprintell is this an ongoing issue, or can the ticket be closed?