one.api

Classes for searching, listing and (down)loading ALyx Files.

Functions

ONE

ONE API factory Determine which class to instantiate depending on parameters passed.

Classes

One

An API for searching and loading data on a local filesystem

OneAlyx

An API for searching and loading data through the Alyx database

class One(cache_dir=None, mode='auto', wildcards=True)[source]

Bases: ConversionMixin

An API for searching and loading data on a local filesystem

property offline

True if mode is local or no Web client set

Type

bool

search_terms(query_type=None) tuple[source]

List the search term keyword args for use in the search method

save_cache(save_dir=None, force=False)[source]

Save One._cache attribute into parquet tables if recently modified.

Parameters
  • save_dir (str, pathlib.Path) – The directory path into which the tables are saved. Defaults to cache directory.

  • force (bool) – If True, the cache is saved regardless of modification time.

refresh_cache(mode='auto')[source]

Check and reload cache tables

Parameters

mode ({'local', 'refresh', 'auto', 'remote'}) – Options are ‘local’ (don’t reload); ‘refresh’ (reload); ‘auto’ (reload if expired); ‘remote’ (don’t reload)

Returns

Loaded timestamp

Return type

datetime.datetime

save_loaded_ids(sessions_only=False, clear_list=True)[source]

Save list of UUIDs corresponding to datasets or sessions where datasets were loaded.

Parameters
  • sessions_only (bool) – If true, save list of experiment IDs, otherwise the full list of dataset IDs.

  • clear_list (bool) – If true, clear the current list of loaded dataset IDs after saving.

Returns

  • list of str – List of UUIDs.

  • pathlib.Path – The file path of the saved list.

search(details=False, query_type=None, **kwargs)[source]

Searches sessions matching the given criteria and returns a list of matching eids

For a list of search terms, use the method

one.search_terms()

For all of the search parameters, a single value or list may be provided. For dataset, the sessions returned will contain all listed datasets. For the other parameters, the session must contain at least one of the entries. NB: Wildcards are not permitted, however if wildcards property is False, regular expressions may be used for all but number and date_range.

Parameters
  • dataset (str, list) – list of dataset names. Returns sessions containing all these datasets. A dataset matches if it contains the search string e.g. ‘wheel.position’ matches ‘_ibl_wheel.position.npy’

  • date_range (str, list, datetime.datetime, datetime.date, pandas.timestamp) – A single date to search or a list of 2 dates that define the range (inclusive). To define only the upper or lower date bound, set the other element to None.

  • lab (str) – A str or list of lab names, returns sessions from any of these labs

  • number (str, int) – Number of session to be returned, i.e. number in sequence for a given date

  • subject (str, list) – A list of subject nicknames, returns sessions for any of these subjects

  • task_protocol (str) – The task protocol name (can be partial, i.e. any task protocol containing that str will be found)

  • projects (str, list) – The project name(s) (can be partial, i.e. any project containing that str will be found)

  • details (bool) – If true also returns a dict of dataset details

  • query_type (str, None) – Query cache (‘local’) or Alyx database (‘remote’)

Returns

  • list – A list of eids

  • (list) – (If details is True) a list of dictionaries, each entry corresponding to a matching session

get_details(eid: Union[str, Path, UUID], full: bool = False)[source]

Return session details for a given session ID

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • full (bool) – If True, returns a DataFrame of session and dataset info

Returns

A session record or full DataFrame with dataset information if full is True

Return type

pd.Series, pd.DataFrame

list_subjects() List[str][source]

List all subjects in database

Returns

Sorted list of subject names

Return type

list

list_datasets(eid=None, filename=None, collection=None, revision=None, details=False, query_type=None) Union[ndarray, DataFrame][source]

Given an eid, return the datasets for those sessions. If no eid is provided, a list of all datasets is returned. When details is false, a sorted array of unique datasets is returned (their relative paths).

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • filename (str, dict, list) – Filters datasets and returns only the ones matching the filename Supports lists asterisks as wildcards. May be a dict of ALF parts.

  • collection (str, list) – The collection to which the object belongs, e.g. ‘alf/probe01’. This is the relative path of the file from the session root. Supports asterisks as wildcards.

  • revision (str) – Filters datasets and returns only the ones matching the revision Supports asterisks as wildcards

  • details (bool) – When true, a pandas DataFrame is returned, otherwise a numpy array of relative paths (collection/revision/filename) - see one.alf.spec.describe for details.

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

Returns

Slice of datasets table or numpy array if details is False

Return type

np.ndarray, pd.DataFrame

Examples

List all unique datasets in ONE cache

>>> datasets = one.list_datasets()

List all datasets for a given experiment

>>> datasets = one.list_datasets(eid)

List all datasets for an experiment that match a collection name

>>> probe_datasets = one.list_datasets(eid, collection='*probe*')

List datasets for an experiment that have ‘wheel’ in the filename

>>> datasets = one.list_datasets(eid, filename='*wheel*')

List datasets for an experiment that are part of a ‘wheel’ or ‘trial(s)’ object

>>> datasets = one.list_datasets(eid, {'object': ['wheel', 'trial?']})
list_collections(eid=None, filename=None, collection=None, revision=None, details=False, query_type=None) Union[ndarray, dict][source]

List the collections for a given experiment. If no experiment ID is given, all collections are returned.

Parameters
  • eid ([str, UUID, Path, dict]) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path

  • filename (str, dict, list) – Filters datasets and returns only the collections containing matching datasets. Supports lists asterisks as wildcards. May be a dict of ALF parts.

  • collection (str, list) – Filter by a given pattern. Supports asterisks as wildcards.

  • revision (str) – Filters collections and returns only the ones with the matching revision. Supports asterisks as wildcards

  • details (bool) – If true a dict of pandas datasets tables is returned with collections as keys, otherwise a numpy array of unique collections

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

Returns

A list of unique collections or dict of datasets tables

Return type

list, dict

Examples

List all unique collections in ONE cache

>>> collections = one.list_collections()

List all collections for a given experiment

>>> collections = one.list_collections(eid)

List all collections for a given experiment and revision

>>> revised = one.list_collections(eid, revision='2020-01-01')

List all collections that have ‘probe’ in the name.

>>> collections = one.list_collections(eid, collection='*probe*')

List collections for an experiment that have datasets with ‘wheel’ in the name

>>> collections = one.list_collections(eid, filename='*wheel*')

List collections for an experiment that contain numpy datasets

>>> collections = one.list_collections(eid, {'extension': 'npy'})
list_revisions(eid=None, filename=None, collection=None, revision=None, details=False, query_type=None)[source]

List the revisions for a given experiment. If no experiment id is given, all collections are returned.

Parameters
  • eid (str, UUID, Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path

  • filename (str, dict, list) – Filters datasets and returns only the revisions containing matching datasets. Supports lists asterisks as wildcards. May be a dict of ALF parts.

  • collection (str, list) – Filter by a given collection. Supports asterisks as wildcards.

  • revision (str, list) – Filter by a given pattern. Supports asterisks as wildcards.

  • details (bool) – If true a dict of pandas datasets tables is returned with collections as keys, otherwise a numpy array of unique collections

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

Returns

A list of unique collections or dict of datasets tables

Return type

list, dict

Examples

List all revisions in ONE cache

>>> revisions = one.list_revisions()

List all revisions for a given experiment

>>> revisions = one.list_revisions(eid)

List all revisions for a given experiment that contain the trials object

>>> revisions = one.list_revisions(eid, filename={'object': 'trials'})

List all revisions for a given experiment that start with 2020 or 2021

>>> revisions = one.list_revisions(eid, revision=['202[01]*'])
load_object(eid: Union[str, Path, UUID], obj: str, collection: Optional[str] = None, revision: Optional[str] = None, query_type: Optional[str] = None, download_only: bool = False, **kwargs) Union[AlfBunch, List[Path]][source]

Load all attributes of an ALF object from a Session ID and an object name. Any datasets with matching object name will be loaded.

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • obj (str) – The ALF object to load. Supports asterisks as wildcards.

  • collection (str) – The collection to which the object belongs, e.g. ‘alf/probe01’. This is the relative path of the file from the session root. Supports asterisks as wildcards.

  • revision (str) – The dataset revision (typically an ISO date). If no exact match, the previous revision (ordered lexicographically) is returned. If None, the default revision is returned (usually the most recent revision). Regular expressions/wildcards not permitted.

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

  • download_only (bool) – When true the data are downloaded and the file path is returned. NB: The order of the file path list is undefined.

  • **kwargs – Additional filters for datasets, including namespace and timescale. For full list see the one.alf.spec.describe function.

Returns

An ALF bunch or if download_only is True, a list of Paths objects

Return type

one.alf.io.AlfBunch, list

Examples

>>> load_object(eid, 'moves')
>>> load_object(eid, 'trials')
>>> load_object(eid, 'spikes', collection='*probe01')  # wildcards is True
>>> load_object(eid, 'spikes', collection='.*probe01')  # wildcards is False
>>> load_object(eid, 'spikes', namespace='ibl')
>>> load_object(eid, 'spikes', timescale='ephysClock')

Load specific attributes:

>>> load_object(eid, 'spikes', attribute=['times*', 'clusters'])
load_dataset(eid: Union[str, Path, UUID], dataset: str, collection: Optional[str] = None, revision: Optional[str] = None, query_type: Optional[str] = None, download_only: bool = False, **kwargs) Any[source]

Load a single dataset for a given session id and dataset name

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • dataset (str, dict) – The ALF dataset to load. May be a string or dict of ALF parts. Supports asterisks as wildcards.

  • collection (str) – The collection to which the object belongs, e.g. ‘alf/probe01’. This is the relative path of the file from the session root. Supports asterisks as wildcards.

  • revision (str) – The dataset revision (typically an ISO date). If no exact match, the previous revision (ordered lexicographically) is returned. If None, the default revision is returned (usually the most recent revision). Regular expressions/wildcards not permitted.

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

  • download_only (bool) – When true the data are downloaded and the file path is returned.

Returns

Dataset or a Path object if download_only is true.

Return type

np.ndarray, pathlib.Path

Examples

>>> intervals = one.load_dataset(eid, '_ibl_trials.intervals.npy')

Load dataset without specifying extension

>>> intervals = one.load_dataset(eid, 'trials.intervals')  # wildcard mode only
>>> intervals = one.load_dataset(eid, '.*trials.intervals.*')  # regex mode only
>>> filepath = one.load_dataset(eid, '_ibl_trials.intervals.npy', download_only=True)
>>> spike_times = one.load_dataset(eid, 'spikes.times.npy', collection='alf/probe01')
>>> old_spikes = one.load_dataset(eid, 'spikes.times.npy',
...                               collection='alf/probe01', revision='2020-08-31')
load_datasets(eid: Union[str, Path, UUID], datasets: List[str], collections: Optional[str] = None, revisions: Optional[str] = None, query_type: Optional[str] = None, assert_present=True, download_only: bool = False, **kwargs) Any[source]

Load datasets for a given session id. Returns two lists the length of datasets. The first is the data (or file paths if download_data is false), the second is a list of meta data Bunches. If assert_present is false, missing data will be returned as None.

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • datasets (list of strings) – The ALF datasets to load. May be a string or dict of ALF parts. Supports asterisks as wildcards.

  • collections (str, list) – The collection(s) to which the object(s) belong, e.g. ‘alf/probe01’. This is the relative path of the file from the session root. Supports asterisks as wildcards.

  • revisions (str, list) – The dataset revision (typically an ISO date). If no exact match, the previous revision (ordered lexicographically) is returned. If None, the default revision is returned (usually the most recent revision). Regular expressions/wildcards not permitted.

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

  • assert_present (bool) – If true, missing datasets raises and error, otherwise None is returned

  • download_only (bool) – When true the data are downloaded and the file path is returned.

Returns

  • list – A list of data (or file paths) the length of datasets

  • list – A list of meta data Bunches. If assert_present is False, missing data will be None

load_dataset_from_id(dset_id: Union[str, UUID], download_only: bool = False, details: bool = False) Any[source]

Load a dataset given a dataset UUID

Parameters
  • dset_id (uuid.UUID, str) – A dataset UUID to load

  • download_only (bool) – If true the dataset is downloaded (if necessary) and the filepath returned

  • details (bool) – If true a pandas Series is returned in addition to the data

Returns

Dataset data (or filepath if download_only) and dataset record if details is True

Return type

np.ndarray, pathlib.Path

load_collection(eid: Union[str, Path, UUID], collection: str, object: Optional[str] = None, revision: Optional[str] = None, query_type: Optional[str] = None, download_only: bool = False, **kwargs) Union[Bunch, List[Path]][source]

Load all objects in an ALF collection from a Session ID. Any datasets with matching object name(s) will be loaded. Returns a bunch of objects.

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • collection (str) – The collection to which the object belongs, e.g. ‘alf/probe01’. This is the relative path of the file from the session root. Supports asterisks as wildcards.

  • object (str) – The ALF object to load. Supports asterisks as wildcards.

  • revision (str) – The dataset revision (typically an ISO date). If no exact match, the previous revision (ordered lexicographically) is returned. If None, the default revision is returned (usually the most recent revision). Regular expressions/wildcards not permitted.

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

  • download_only (bool) – When true the data are downloaded and the file path is returned.

  • **kwargs – Additional filters for datasets, including namespace and timescale. For full list see the one.alf.spec.describe function.

Returns

A Bunch of objects or if download_only is True, a list of Paths objects

Return type

Bunch of one.alf.io.AlfBunch, list of pathlib.Path

Examples

>>> alf_collection = load_collection(eid, 'alf')
>>> load_collection(eid, '*probe01', object=['spikes', 'clusters'])  # wildcards is True
>>> files = load_collection(eid, '', download_only=True)  # Base session dir
Raises
  • alferr.ALFError – No datasets exist for the provided session collection

  • alferr.ALFObjectNotFound – No datasets match the object, attribute or revision filters for this collection

static setup(cache_dir=None, silent=False, **kwargs)[source]

Set up One cache tables for a given data directory.

Parameters
  • cache_dir (pathlib.Path, str) – A path to the ALF data directory

  • silent ((False) bool) – when True will prompt for cache_dir if cache_dir is None, and overwrite cache if any when False will use cwd for cache_dir if cache_dir is None and use existing cache

  • **kwargs – Optional arguments to pass to one.alf.cache.make_parquet_db.

Returns

An instance of One for the provided cache directory

Return type

One

ONE(*, mode='auto', wildcards=True, **kwargs)[source]

ONE API factory Determine which class to instantiate depending on parameters passed.

Parameters
  • mode (str) – Query mode, options include ‘auto’, ‘local’ (offline) and ‘remote’ (online only). Most methods have a query_type parameter that can override the class mode.

  • wildcards (bool) – If true all mathods use unix shell style pattern matching, otherwise regular expressions are used.

  • cache_dir (str, Path) – Path to the data files. If Alyx parameters have been set up for this location, an OneAlyx instance is returned. If data_dir and base_url are None, the default location is used.

  • base_url (str) – An Alyx database URL. The URL must start with ‘http’.

  • username (str) – An Alyx database login username.

  • password (str) – An Alyx database password.

  • cache_rest (str) – If not in ‘local’ mode, this determines which http request types to cache. Default is ‘GET’. Use None to deactivate cache (not recommended).

Returns

An One instance if mode is ‘local’, otherwise an OneAlyx instance.

Return type

One, OneAlyx

class OneAlyx(username=None, password=None, base_url=None, cache_dir=None, mode='auto', wildcards=True, **kwargs)[source]

Bases: One

An API for searching and loading data through the Alyx database

property alyx

The Alyx Web client

Type

one.webclient.AlyxClient

property cache_dir

The location of the downloaded file cache

Type

pathlib.Path

search_terms(query_type=None)[source]

Returns a list of search terms to be passed as kwargs to the search method

Parameters

query_type (str) – If ‘remote’, the search terms are largely determined by the REST endpoint used

Returns

Tuple of search strings

Return type

tuple

describe_dataset(dataset_type=None)[source]

Print a dataset type description.

NB: This requires an Alyx database connection.

Parameters

dataset_type (str) – A dataset type or dataset name

Returns

The Alyx dataset type record

Return type

dict

list_datasets(eid=None, filename=None, collection=None, revision=None, details=False, query_type=None) Union[ndarray, DataFrame][source]

Given an eid, return the datasets for those sessions. If no eid is provided, a list of all datasets is returned. When details is false, a sorted array of unique datasets is returned (their relative paths).

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • filename (str, dict, list) – Filters datasets and returns only the ones matching the filename Supports lists asterisks as wildcards. May be a dict of ALF parts.

  • collection (str, list) – The collection to which the object belongs, e.g. ‘alf/probe01’. This is the relative path of the file from the session root. Supports asterisks as wildcards.

  • revision (str) – Filters datasets and returns only the ones matching the revision Supports asterisks as wildcards

  • details (bool) – When true, a pandas DataFrame is returned, otherwise a numpy array of relative paths (collection/revision/filename) - see one.alf.spec.describe for details.

  • query_type (str) – Query cache (‘local’) or Alyx database (‘remote’)

Returns

Slice of datasets table or numpy array if details is False

Return type

np.ndarray, pd.DataFrame

Examples

List all unique datasets in ONE cache

>>> datasets = one.list_datasets()

List all datasets for a given experiment

>>> datasets = one.list_datasets(eid)

List all datasets for an experiment that match a collection name

>>> probe_datasets = one.list_datasets(eid, collection='*probe*')

List datasets for an experiment that have ‘wheel’ in the filename

>>> datasets = one.list_datasets(eid, filename='*wheel*')

List datasets for an experiment that are part of a ‘wheel’ or ‘trial(s)’ object

>>> datasets = one.list_datasets(eid, {'object': ['wheel', 'trial?']})
pid2eid(pid: str, query_type=None) -> (<class 'str'>, <class 'str'>)[source]

Given an Alyx probe UUID string, returns the session id string and the probe label (i.e. the ALF collection).

NB: Requires a connection to the Alyx database.

Parameters
  • pid (str, uuid.UUID) – A probe UUID

  • query_type (str) – Query mode - options include ‘remote’, and ‘refresh’

Returns

  • str – Experiment ID (eid)

  • str – Probe label

search(details=False, query_type=None, **kwargs)[source]

Searches sessions matching the given criteria and returns a list of matching eids

For a list of search terms, use the method

one.search_terms(query_type=’remote’)

For all of the search parameters, a single value or list may be provided. For dataset, the sessions returned will contain all listed datasets. For the other parameters, the session must contain at least one of the entries. NB: Wildcards are not permitted, however if wildcards property is False, regular expressions may be used for all but number and date_range.

Parameters
  • dataset (str, list) – List of dataset names. Returns sessions containing all these datasets. A dataset matches if it contains the search string e.g. ‘wheel.position’ matches ‘_ibl_wheel.position.npy’

  • date_range (str, list, datetime.datetime, datetime.date, pandas.timestamp) – A single date to search or a list of 2 dates that define the range (inclusive). To define only the upper or lower date bound, set the other element to None.

  • lab (str, list) – A str or list of lab names, returns sessions from any of these labs

  • number (str, int) – Number of session to be returned, i.e. number in sequence for a given date

  • subject (str, list) – A list of subject nicknames, returns sessions for any of these subjects

  • task_protocol (str, list) – The task protocol name (can be partial, i.e. any task protocol containing that str will be found)

  • project(s) (str, list) – The project name (can be partial, i.e. any task protocol containing that str will be found)

  • performance_gte (performance_lte /) – Search only for sessions whose performance is less equal or greater equal than a pre-defined threshold as a percentage (0-100)

  • users (str, list) – A list of users

  • location (str, list) – A str or list of lab location (as per Alyx definition) name Note: this corresponds to the specific rig, not the lab geographical location per se

  • dataset_types (str, list) – One or more of dataset_types

  • details (bool) – If true also returns a dict of dataset details

  • query_type (str, None) – Query cache (‘local’) or Alyx database (‘remote’)

  • limit (int) – The number of results to fetch in one go (if pagination enabled on server)

Returns

  • list – List of eids

  • (list of dicts) – If details is True, also returns a list of dictionaries, each entry corresponding to a matching session

static setup(base_url=None, **kwargs)[source]

Set up OneAlyx for a given database

Parameters
  • base_url (str) – An Alyx database URL. If None, the current default database is used.

  • **kwargs – Optional arguments to pass to one.params.setup.

Returns

An instance of OneAlyx for the newly set up database URL

Return type

OneAlyx

eid2path(eid, query_type=None) Union[Path, Sequence[Path]][source]

From an experiment ID gets the local session path

Parameters
  • eid (str, UUID, pathlib.Path, dict, list) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • query_type (str) – If set to ‘remote’, will force database connection

Returns

A session path or list of session paths

Return type

pathlib.Path, list

path2eid(path_obj: Union[str, Path], query_type=None) Union[Path, Sequence[Path]][source]

From a local path, gets the experiment ID

Parameters
  • path_obj (str, pathlib.Path, list) – Local path or list of local paths

  • query_type (str) – If set to ‘remote’, will force database connection

Returns

An eid or list of eids

Return type

str, list

path2url(filepath, query_type=None) str[source]

Given a local file path, returns the URL of the remote file.

Parameters
  • filepath (str, pathlib.Path) – A local file path

  • query_type (str) – If set to ‘remote’, will force database connection

Returns

A URL string

Return type

str

type2datasets(eid, dataset_type, details=False)[source]

Get list of datasets belonging to a given dataset type for a given session

Parameters
  • eid (str, UUID, pathlib.Path, dict) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • dataset_type (str, list) – An Alyx dataset type, e.g. camera.times or a list of dtypes

  • details (bool) – If True, a datasets DataFrame is returned

Returns

A numpy array of data, or DataFrame if details is true

Return type

np.ndarray, dict

dataset2type(dset) str[source]

Return dataset type from dataset.

NB: Requires an Alyx database connection

Parameters

dset (str, np.ndarray, tuple) – A dataset name, dataset uuid or dataset integer id

Returns

The dataset type

Return type

str

describe_revision(revision, full=False)[source]

Print description of a revision

Parameters
  • revision (str) – The name of the revision (without ‘#’)

  • full (bool) – If true, returns the matching record

Returns

None if full is false or no record found, otherwise returns record as dict

Return type

None, dict

get_details(eid: str, full: bool = False, query_type=None)[source]

Return session details for a given session

Parameters
  • eid (str, UUID, pathlib.Path, dict, list) – Experiment session identifier; may be a UUID, URL, experiment reference string details dict or Path.

  • full (bool) – If True, returns a DataFrame of session and dataset info

  • query_type ({'local', 'refresh', 'auto', 'remote'}) – The query mode - if ‘local’ the details are taken from the cache tables; if ‘remote’ the details are returned from the sessions REST endpoint; if ‘auto’ uses whichever mode ONE is in; if ‘refresh’ reloads the cache before querying.

Returns

in local mode - a session record or full DataFrame with dataset information if full is True; in remote mode - a full or partial session dict

Return type

pd.Series, pd.DataFrame, dict

Raises
  • ValueError – Invalid experiment ID (failed to parse into eid string)

  • requests.exceptions.HTTPError – [Errno 404] Remote session not found on Alyx