Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running skeletor example throws error #42

Open
mmc46 opened this issue Oct 29, 2020 · 0 comments
Open

Running skeletor example throws error #42

mmc46 opened this issue Oct 29, 2020 · 0 comments

Comments

@mmc46
Copy link
Contributor

mmc46 commented Oct 29, 2020

Running the example in R in http://natverse.org/fafbseg/articles/articles/installing-cloudvolume-meshparty.html, after installing skeletor.

Blender is a requirement, though it is not currently mentioned in docs. It is installed in /Applications/blender.app. For python to see it, I added a symlink to a path reticulate was looking at, /usr/local/bin.

ln -s /Applications/blender.app/Contents/MacOS/Blender /usr/local/bin/blender
# Checking that reticulate finds Blender
reticulate::py_run_string("import os")
reticulate::py_run_string("from distutils.spawn import find_executable")
reticulate::py_run_string("blender_executable = find_executable('blender')")
reticulate::py_run_string("print('Blender executable:', blender_executable)")
Blender executable: /usr/local/bin/blender

# running example in docs
library(natverse)
#> Loading required package: elmr
#> Loading required package: catmaid
#> Loading required package: httr
#> Loading required package: nat
#> Loading required package: rgl
#> Registered S3 method overwritten by 'nat':
#>   method             from
#>   as.mesh3d.ashape3d rgl
#> 
#> Attaching package: 'nat'
#> The following object is masked from 'package:rgl':
#> 
#>     wire3d
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, union
#> Loading required package: nat.flybrains
#> Loading required package: nat.templatebrains
#> Loading required package: nat.nblast
library(fafbseg)
#> Run dr_fafbseg() for a status report on your installation
choose_segmentation("flywire")
nx=xform_brain(elmr::dense_core_neurons, ref="FlyWire", sample="FAFB14")
xyz =xyzmatrix(nx)
ids = unique(flywire_xyz2id(xyz[sample(1:nrow(xyz),100),]))
neurons = skeletor(ids)
#> Failed: 720575940634367221
#> Error in py_run_string_impl(code, local, convert): CalledProcessError: Command '['/usr/local/bin/blender', '--background', '--python', '/var/folders/by/vvm2pb4s4vlgp5bgqqny8kdm0000gn/T/tmpymlc5rct']' died with <Signals.SIGABRT: 6>.
#> 
#> Detailed traceback: 
#>   File "<string>", line 1, in <module>
#>   File "/opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/skeletor/preprocessing.py", line 230, in simplify
#>     result = blend.run(_blender_executable
#>   File "/opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/trimesh/interfaces/generic.py", line 87, in run
#>     check_call(command_run,
#>   File "/opt/miniconda3/envs/flywire_env/lib/python3.8/subprocess.py", line 364, in check_call
#>     raise CalledProcessError(retcode, cmd)
#> Failed: 720575940637192819
#> Error in py_run_string_impl(code, local, convert): CalledProcessError: Command '['/usr/local/bin/blender', '--background', '--python', '/var/folders/by/vvm2pb4s4vlgp5bgqqny8kdm0000gn/T/tmpov7cq59r']' died with <Signals.SIGABRT: 6>.
#> 
#> Detailed traceback: 
#>   File "<string>", line 1, in <module>
#>   File "/opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/skeletor/preprocessing.py", line 230, in simplify
#>     result = blend.run(_blender_executable
#>   File "/opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/trimesh/interfaces/generic.py", line 87, in run
#>     check_call(command_run,
#>   File "/opt/miniconda3/envs/flywire_env/lib/python3.8/subprocess.py", line 364, in check_call
#>     raise CalledProcessError(retcode, cmd)
#> Warning in skeletor(ids): 2 ids could not be read and converted to skeletons

With the error, I also get a prompt that Blender has crashed
Screenshot 2020-10-29 at 15 35 38

I can run the python skeletor example without problems.

From dr_fafbseg()

Python
----
python:         /opt/miniconda3/envs/flywire_env/bin/python
libpython:      /opt/miniconda3/envs/flywire_env/lib/libpython3.8.dylib
pythonhome:     /opt/miniconda3/envs/flywire_env:/opt/miniconda3/envs/flywire_env
version:        3.8.5 (default, Sep  4 2020, 02:22:02)  [Clang 10.0.0 ]
numpy:          /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/numpy
numpy_version:  1.19.2

NOTE: Python version was forced by RETICULATE_PYTHON

                     module available version
1               cloudvolume      TRUE   3.2.1
2                   DracoPy      TRUE        
3                 meshparty      TRUE   1.8.0
4                  skeletor      TRUE  0.2.10
5                  pykdtree      TRUE        
6                  pyembree      TRUE   0.1.6
7 annotationframeworkclient      TRUE   2.0.1
8            PyChunkedGraph     FALSE        
9                   igneous      TRUE        
                                                                                    path
1               /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/cloudvolume
2                                                                                       
3                 /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/meshparty
4                  /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/skeletor
5                  /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/pykdtree
6                  /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/pyembree
7 /opt/miniconda3/envs/flywire_env/lib/python3.8/site-packages/annotationframeworkclient
8                                                                                       
9                                                           /Users/mmc46/igneous/igneous

Any ideas on how to fix this?

@mmc46 mmc46 changed the title Running skeleton example throws error Running skeletor example throws error Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant