-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
streamlines example test fails with URL not found: Forbidden
To Reproduce
- Run
pytest -vv tests/test_examples.py --runslow --runlocal
(MacOs M2 on 8866e3a with vedo 2023.4.6) - Output is
========================================================================================================= FAILURES ==========================================================================================================
_______________________________________________________________________________________________________ test_examples _______________________________________________________________________________________________________
@pytest.mark.slow
@pytest.mark.local
def test_examples():
> import examples
tests/test_examples.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../mambaforge/envs/brainrender-py311/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: in _import
return original_import(name, *args, **kwargs)
examples/__init__.py:1: in <module>
from examples import (
../../mambaforge/envs/brainrender-py311/lib/python3.11/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: in _import
return original_import(name, *args, **kwargs)
examples/streamlines.py:19: in <module>
streams = get_streamlines_for_region("TH")[:2]
brainrender/atlas_specific/allen_brain_atlas/streamlines.py:109: in get_streamlines_for_region
return get_streamlines_data(
brainrender/atlas_specific/allen_brain_atlas/streamlines.py:70: in get_streamlines_data
response = request(url)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
url = 'https://neuroinformatics.nl/HBP/allen-connectivity-viewer/json/streamlines_174957972.json.gz'
def request(url):
"""
Sends a request to a url
:param url:
"""
if not connected_to_internet(): # pragma: no cover
raise ConnectionError(
"No internet connection found."
) # pragma: no cover
response = requests.get(url)
if response.ok:
return response
else: # pragma: no cover
exception_string = "URL request failed: {}".format(
response.reason
) # pragma: no cover
> raise ValueError(exception_string)
E ValueError: URL request failed: Forbidden
brainrender/_io.py:57: ValueError
Expected behavior
Tests pass
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Backlog