ClimateCompatibleGrowth / research_index_backend

Provisioning the graph database which forms the backend of the research index
MIT License
0 stars 0 forks source link

Illegal openaire token results in failed search error #7

Open willu47 opened 3 months ago

willu47 commented 3 months ago

If the OpenAire token is illegal or incorrect, then this is not raised as an error. Instead, we get the following consequent errors:

$ research_index data/d2d.txt 
  0%|                                                                                                                                                | 0/4 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/pi/mambaforge/envs/research_index/bin/research_index", line 8, in <module>
    sys.exit(entry_point())
             ^^^^^^^^^^^^^
  File "/home/pi/repositories/research_index_backend/src/research_index_backend/create_graph_from_doi.py", line 324, in entry_point
    result = main(list_of_dois, graph)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/repositories/research_index_backend/src/research_index_backend/create_graph_from_doi.py", line 257, in main
    metadata = get_output_metadata(session, valid_doi)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/repositories/research_index_backend/src/research_index_backend/create_graph_from_doi.py", line 97, in get_output_metadata
    response.raise_for_status()
  File "/home/pi/mambaforge/envs/research_index/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.openaire.eu/search/researchProducts?format=json&doi=10.33774/coe-2023-sqbfm-v5