fafbseg not finding cloudvolume

22 views
Skip to first unread message

artx...@gmail.com

unread,
Mar 5, 2025, 4:06:07 PMMar 5
to nat-user
Hi Greg,

I'm running fafbseg on a windows OS and having some trouble get cloudvolume to work. If i query a rootid using cloudvolume:

flywire_rootid("720575940628031249", method = 'cloudvolume')

it returns this error:
numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 80 from PyObject Error: Please install the python cloudvolume package: This should normally work: fafbseg::simple_python('basic') For more details see ?simple_python or the cloud-volume docshttps://github.com/seung-lab/cloud-volume#setup If you have already installed cloudvolume but it is not found then R probably can't find the relevant version of Python Do: usethis::edit_r_environ() to point to the right python e.g. RETICULATE_PYTHON="/opt/miniconda3/envs/r-reticulate/bin/python"


This is what dr_fafbseg() returns:

Message has been deleted
Message has been deleted
Message has been deleted

artx...@gmail.com

unread,
Mar 5, 2025, 5:16:13 PMMar 5
to nat-user
> dr_fafbseg()
R packages
----
fafbseg package:
Version: 0.15.2
GithubSHA1: 1d65c302115d04986ea004562015bd7f37936e87
Packaged: 2025-03-05 18:26:07 UTC; z

-- File:
R arrow package:  19.0.1
FlyWire
----
Checking secrets folder for tokens from R: C:/Users/z/.cloudvolume/secrets
✔ Valid FlyWire ChunkedGraph token is set and found by R!
• Please use `simple_python()` to install python+cloudvolume for full access to flywire API!

numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 80 from PyObject
Error : Please install the python cloudvolume package:
This should normally work:
fafbseg::simple_python('basic')
For more details see ?simple_python or the cloud-volume docshttps://github.com/seung-lab/cloud-volume#setup
If you have already installed cloudvolume but it is not found
then R probably can't find the relevant version of Python
Do:
usethis::edit_r_environ()
 to point to the right python
e.g. RETICULATE_PYTHON="/opt/miniconda3/envs/r-reticulate/bin/python"
✔ You have a working CAVE setup with access to the following datasets:
  fanc_sandbox,flywire_fafb_production,flywire_fafb_public,flywire_fafb_sandbox,minnie35_public_v0,minnie65_public,minnie65_public_v117,minnie65_public_v343,minnie65_public_v661,minnie65_sandbox,pinky_sandbox
✔ You have CAVE access to the `flywire_fafb_production` dataset
✔ You have CAVE access to the `flywire_fafb_public` dataset

1 FlyWire/CloudVolume credential files available at
C:/Users/z/.cloudvolume/secrets
[1] "cave-secret.json"

Flywire cloudvolume URL: graphene://https://prod.flywire-daf.com/segmentation/table/fly_v31
Google FFN1 segmentation
----
• Set the `fafbseg.skelziproot` option:
   `options(fafbseg.skelziproot="/path/to/zips")`
  if you want to use FFN1 skeleton files!

Python
----
python:         C:/Users/z/AppData/Local/r-miniconda/envs/r-reticulate/python.exe
libpython:      C:/Users/z/AppData/Local/r-miniconda/envs/r-reticulate/python38.dll
pythonhome:     C:/Users/z/AppData/Local/r-miniconda/envs/r-reticulate
version:        3.8.13 | packaged by conda-forge | (default, Mar 25 2022, 05:59:00) [MSC v.1929 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:/Users/z/AppData/Local/r-miniconda/envs/r-reticulate/Lib/site-packages/numpy
numpy_version:  1.17.3

NOTE: Python version was forced by use_python() function

          package version         requirement channel installed  core
1    cloud-volume  11.2.0 cloud-volume=11.2.0    pypi      TRUE  TRUE
2      caveclient   7.3.1    caveclient=7.3.1    pypi      TRUE  TRUE
3    seatable-api   3.0.0  seatable-api=3.0.0    pypi      TRUE  TRUE
4         pyarrow   8.0.0       pyarrow=8.0.0    pypi      TRUE FALSE
5         fafbseg    <NA>                <NA>    <NA>     FALSE FALSE
6         DracoPy    <NA>                <NA>    <NA>     FALSE FALSE
7       meshparty    <NA>                <NA>    <NA>     FALSE FALSE
8        skeletor    <NA>                <NA>    <NA>     FALSE FALSE
9        pykdtree    <NA>                <NA>    <NA>     FALSE FALSE
10       pyembree    <NA>                <NA>    <NA>     FALSE FALSE
11 pychunkedgraph    <NA>                <NA>    <NA>     FALSE FALSE
12        igneous    <NA>                <NA>    <NA>     FALSE FALSE
13      fastremap  1.15.1    fastremap=1.15.1    pypi      TRUE FALSE
14      ncollpyde    <NA>                <NA>    <NA>     FALSE FALSE

fafbseg package options
----
List of 6
 $ fafbseg.cachedir           : chr "C:\\Users\\z\\AppData\\Local/R/fafbseg"
 $ fafbseg.cave.datastack_name: chr "flywire_fafb_production"
 $ fafbseg.cloudvolume.url    : chr "graphene://https://prod.flywire-daf.com/segmentation/table/fly_v31"
 $ fafbseg.condaenv           : chr "r-reticulate"
 $ fafbseg.sampleurl          : chr "https://ngl.flywire.ai/#!%7B%22layers%22:%5B%7B%22source%22:%22precomputed://gs://microns-seunglab/drosophila_v"| __truncated__
 $ fafbseg.sqlitepath         : chr "~/projects/JanFunke/"
NULL

rJava
----
The rJava package is linked to the following JVM
java.version: 15
java.home: C:\Program Files\Java\jdk-15
java.class.version: 59.0

System java
----
(used as a fallback when rJava not available)
java run time found at: C:\PROGRA~1\Java\jdk-15\bin\java.exe
java.version: NA

h5reg test
----
Using transform helper: transform-helpers-0.0.3-SNAPSHOT-shaded.jar
h5reg xform infrastructure OK!
xform test gave correct results

Although simple_python('basic') apparently successfully installs cloudvolume. Any ideas? 

Thanks in advance,
Arthur

Gregory Jefferis

unread,
Mar 5, 2025, 9:57:53 PMMar 5
to artx...@gmail.com, nat-user
Dear Art, Yes, you have an incompatible numpy installed somehow. The version 1.17.3 looks old to me. But the Python version itself looks old 3.8.13 so you probably don’t want numpy 2. 

Normally reinstalling numpy and restarting your R session (which is required to start a new Python session under the hood) should do the trick. 

simple_python(pyinstall = 'none', pkgs = 'numpy')

Or perhaps 

simple_python(pyinstall = 'none', pkgs = 'numpy-~=1.26')

To install the latest 1.x numpy rather than numpy 2.x

Good luck,

Greg. 

Sent from my iPhone

On 5 Mar 2025, at 22:16, artx...@gmail.com <artx...@gmail.com> wrote:

> dr_fafbseg()
--
You received this message because you are subscribed to the Google Groups "nat-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nat-user+u...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/nat-user/0521f756-4e8b-4d5b-a2cd-55cc1e849b27n%40googlegroups.com.

Arthur Zhao

unread,
Mar 6, 2025, 5:11:46 PMMar 6
to Gregory Jefferis, nat-user
Thank you, Greg! 

`simple_python(pyinstall = 'none', pkgs = 'numpy')` did the trick. 

Best,
Art

Gregory Jefferis

unread,
Mar 6, 2025, 5:34:17 PMMar 6
to Arthur Zhao, nat-user
Great! Thanks for confirming. All the best, Greg

Sent from my iPhone

On 6 Mar 2025, at 22:11, Arthur Zhao <artx...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages