Skip to content

Url expired in load_overview.py #1

@TanyaCST

Description

@TanyaCST

Original code:

# Loading grein overview

# loading a subset of the data
# number_of_datasets = 1000
# overview = loader.load_overview(number_of_datasets)

# loading all the data
overview = loader.load_overview()

# Accessing the geo_accession ID and study species from overview
geo_accession_ids = []
species = []
for i in range(len(overview)):
    geo_accession_ids.append(overview[i]['geo_accession'])
    species.append(overview[i]['species'])

Error message when calling grein_loader in 1D.download-grein-data.ipynb:

--- Logging error ---
Traceback (most recent call last):
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/grein_loader/load_overview.py", line 52, in load_overview
    xhr_streaming_r.raise_for_status()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: https://www.ilincs.org/apps/grein/__sockjs__/n=QmDgRJqZZD/Ihu/tBDVVLLN/xhr_streaming

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/logging/__init__.py", line 1110, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/logging/__init__.py", line 953, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/logging/__init__.py", line 687, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/logging/__init__.py", line 377, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel_launcher.py", line 18, in <module>
    app.launch_new_instance()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/traitlets/config/application.py", line 1075, in launch_instance
    app.start()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/kernelapp.py", line 739, in start
    self.io_loop.start()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/tornado/platform/asyncio.py", line 205, in start
    self.asyncio_loop.run_forever()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/asyncio/base_events.py", line 608, in run_forever
    self._run_once()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/asyncio/base_events.py", line 1936, in _run_once
    handle._run()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 545, in dispatch_queue
    await self.process_one()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 534, in process_one
    await dispatch(*args)
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 437, in dispatch_shell
    await result
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 362, in execute_request
    await super().execute_request(stream, ident, parent)
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/kernelbase.py", line 778, in execute_request
    reply_content = await reply_content
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/ipkernel.py", line 449, in do_execute
    res = shell.run_cell(
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/ipykernel/zmqshell.py", line 549, in run_cell
    return super().run_cell(*args, **kwargs)
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3047, in run_cell
    result = self._run_cell(
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3102, in _run_cell
    result = runner(coro)
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/IPython/core/async_helpers.py", line 128, in _pseudo_sync_runner
    coro.send(None)
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3306, in run_cell_async
    has_raised = await self.run_ast_nodes(code_ast.body, cell_name,
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3489, in run_ast_nodes
    if await self.run_code(code, result, async_=asy):
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3549, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_2559291/1781331198.py", line 8, in <module>
    overview = loader.load_overview()
  File "/home/schen_smith_edu/.conda/envs/biobombe/lib/python3.11/site-packages/grein_loader/load_overview.py", line 54, in load_overview
    LOGGER.error("Streaming error: ", err)
Message: 'Streaming error: '
Arguments: (HTTPError('405 Client Error: Method Not Allowed for url: https://www.ilincs.org/apps/grein/__sockjs__/n=QmDgRJqZZD/Ihu/tBDVVLLN/xhr_streaming'),)
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
File [~/.conda/envs/biobombe/lib/python3.11/site-packages/grein_loader/load_overview.py:52](https://ood.unity.rc.umass.edu/node/gypsum-gpu049.unity.rc.umass.edu/39519/lab/tree/home/schen_smith_edu/biobombe/BioBombe-master/0.expression-download/~/.conda/envs/biobombe/lib/python3.11/site-packages/grein_loader/load_overview.py#line=51), in load_overview(no_datasets)
     51     lines = xhr_streaming_r.iter_lines()  # saves information provided by the streaming response
---> 52     xhr_streaming_r.raise_for_status()
     53 except requests.exceptions.HTTPError as err:

File [~/.conda/envs/biobombe/lib/python3.11/site-packages/requests/models.py:1024](https://ood.unity.rc.umass.edu/node/gypsum-gpu049.unity.rc.umass.edu/39519/lab/tree/home/schen_smith_edu/biobombe/BioBombe-master/0.expression-download/~/.conda/envs/biobombe/lib/python3.11/site-packages/requests/models.py#line=1023), in Response.raise_for_status(self)
   1023 if http_error_msg:
-> 1024     raise HTTPError(http_error_msg, response=self)

HTTPError: 405 Client Error: Method Not Allowed for url: https://www.ilincs.org/apps/grein/__sockjs__/n=QmDgRJqZZD/Ihu/tBDVVLLN/xhr_streaming

During handling of the above exception, another exception occurred:

GreinLoaderException                      Traceback (most recent call last)
Cell In[5], line 8
      1 # Loading grein overview
      2 
      3 # loading a subset of the data
   (...)      6 
      7 # loading all the data
----> 8 overview = loader.load_overview()
     10 # Accessing the geo_accession ID and study species from overview
     11 geo_accession_ids = []

File [~/.conda/envs/biobombe/lib/python3.11/site-packages/grein_loader/load_overview.py:55](https://ood.unity.rc.umass.edu/node/gypsum-gpu049.unity.rc.umass.edu/39519/lab/tree/home/schen_smith_edu/biobombe/BioBombe-master/0.expression-download/~/.conda/envs/biobombe/lib/python3.11/site-packages/grein_loader/load_overview.py#line=54), in load_overview(no_datasets)
     53 except requests.exceptions.HTTPError as err:
     54     LOGGER.error("Streaming error: ", err)
---> 55     raise GreinLoaderException("Streaming error: ", err)
     57 for line in lines:  # decodes content of provided by the streaming request
     58     line_content = line.decode()

GreinLoaderException: ('Streaming error: ', HTTPError('405 Client Error: Method Not Allowed for url: https://www.ilincs.org/apps/grein/__sockjs__/n=QmDgRJqZZD/Ihu/tBDVVLLN/xhr_streaming'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions