Skip to content

Commit

Permalink
fetch connectivity: improve error message filtered-True and live queries
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Nov 14, 2023
1 parent 1078b18 commit 5b5830e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fafbseg/flywire/synapses.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,10 @@ def fetch_synapses(
columns += ["gaba", "ach", "glut", "oct", "ser", "da"]

if mat == "live" and filtered:
raise ValueError("Can't fetch filtered synapses for live query.")
raise ValueError("It is currently not possible to fetch filtered "
"synapses in live queries. You can set `filtered=False` "
"but please be aware that this will query the "
"unfiltered synapse table. See docs for details.")
elif mat == "live":
func = partial(
retry(client.materialize.live_query),
Expand Down Expand Up @@ -991,7 +994,10 @@ def fetch_connectivity(
columns += ["gaba", "ach", "glut", "oct", "ser", "da"]

if mat == "live" and filtered:
raise ValueError("Can't fetch filtered synapses for live query.")
raise ValueError("It is currently not possible to fetch filtered "
"synapses in live queries. You can set `filtered=False` "
"but please be aware that this will query the "
"unfiltered synapse table. See docs for details.")
elif mat == "live":
func = partial(
retry(client.materialize.live_query),
Expand Down

0 comments on commit 5b5830e

Please sign in to comment.