Error while making video using brainrender 1.0.1.1: AttributeError: 'NoneType' object has no attribute 'Elevation'
See original GitHub issueHello,
I am using brainrender Version: 1.0.1.1 within jupyter notebook inside Chrome.
I am unable to recreate the video example mentioned in old Github “examples” repository [here].(https://github.com/brainglobe/brainrender/blob/4c087bc4cb8f94ba394dc0cf75baa646065ea44b/Examples/advanced/videomaker.py)
Following is my code:
import brainrender
brainrender.SHADER_STYLE = 'cartoon'
from brainrender.scene import Scene
from brainrender.animation.video import BasicVideoMaker as VideoMaker
scene = Scene()
scene.add_brain_regions(['RN'], color="violet")
scene.add_cells_from_file("C:\\Users\\7057mehrav\\Documents\\164-test\\cells_in_standard_space.h5", radius=15,alpha=0.5)
# Create an instance of VideoMaker with our scene
vm = VideoMaker(scene, niters=30) # niters = number of frames
# Make a video!
vm.make_video(
elevation=1, roll=5
) # specify how the scene rotates at each frame
After promising messages, I get an error:
Bg_atlasapi: allen_mouse_25um version 1.1 is not the latest available (1.2). To update the
atlas run in the terminal:
brainglobe update -a allen_mouse_25um
allen mouse atlas (res. 25um)
From: http://www.brain-map.com (Wang et al 2020, https://doi.org/10.1016/j.cell.2020.04.007 )
Setting 'display_inset' to False as this feature is not available in juputer notebooks
Setting window size to 'auto' as whole screen is not available in jupyter
Added 15473 cells to the scene
Saving video in C:\Users\7057mehrav\.brainrender\Output/Videos
('\x0bideo Video', 'brainrender_video__20201203_123641', 'is open...')
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-3ee3c505a465> in <module>
15 # Make a video!
16 vm.make_video(
---> 17 elevation=1, roll=5
18 ) # specify how the scene rotates at each frame
c:\users\7057mehrav\appdata\local\continuum\anaconda3\envs\brainrender\lib\site-packages\brainrender\animation\video.py in make_video(self, azimuth, elevation, roll, **kwargs)
144 for i in range(self.niters):
145 self.scene.plotter.show() # render(interactive=False, video=True) # render the scene first
--> 146 self.scene.plotter.camera.Elevation(elevation)
147 self.scene.plotter.camera.Azimuth(azimuth)
148 self.scene.plotter.camera.Roll(roll)
AttributeError: 'NoneType' object has no attribute 'Elevation'
What could be causing this? I have already looked in the location where it tries to save the output but that folder is empty. Is it because I am running this functionality from within jupyter?
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Top Results From Across the Web
Odd Brainrender GUI on M1 mac - Usage & Issues
**I am using a M1 Macbook with python 3.9 proand this is the error code I see ... AttributeError: 'NoneType' object has no...
Read more >Attribute Error 'NoneType' object has no attribute
The problem is that print doesn't return anything -- in other words, it always returns None . You want this: Prep = re.sub(r"...
Read more >brainrender - PyPI
brainrender is a python package for the visualization of three dimensional neuroanatomical data. It can be used to render data from publicly available...
Read more >Using brainrender for whole brain visualization - YouTube
Learn how to use BrainRender and Napari to annotate and explore whole-brain datasets from your own computer.Some of the key takeaways from ......
Read more >'NoneType' object has no attribute 'new" error with align_epi_a
Hello, I am encountering an "AttributeError: 'NoneType' object has no attribute 'new" error while in the middle of running align_epi_anat.py ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see, okay. To use the .h5 files you just need a function that loads the file and gets the coordinates 😃
Anyway, I’ll close this for now then but let me know if you bump into other problems
Hey @FedeClaudi,
I haven’t tested it yet because I am still working with h5 files which new version doesn’t support. We created a lot of h5 files using cellfinder’s function “points_to_brainrender” which converts xml output from cellfinder to h5. So we will have to continue using older version of brainrender for a while.
Thanks!