Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while making video using brainrender AttributeError: 'NoneType' object has no attribute 'Elevation'

See original GitHub issue


I am using brainrender Version: within jupyter notebook inside Chrome.

I am unable to recreate the video example mentioned in old Github “examples” repository [here].(

Following is my code:

import brainrender
brainrender.SHADER_STYLE = 'cartoon'
from brainrender.scene import Scene
from 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!
    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: (Wang et al 2020, )
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\ in make_video(self, azimuth, elevation, roll, **kwargs)
    144         for i in range(self.niters):
    145     # render(interactive=False, video=True)  # render the scene first
--> 146   

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:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

FedeClaudicommented, Dec 9, 2020

I see, okay. To use the .h5 files you just need a function that loads the file and gets the coordinates 😃

def load_cells(path):
    return pd.read_hdf(path).values

Anyway, I’ll close this for now then but let me know if you bump into other problems

rdbcasillascommented, Dec 9, 2020

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.


Read more comments on GitHub >

github_iconTop 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 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found