niwidgets icon indicating copy to clipboard operation
niwidgets copied to clipboard

cannot import "Video"

Open armaneshaghi opened this issue 7 years ago • 4 comments

Just immediately after installation I get the following errror on Python 3.6.5:

from niwidgets import NiftiWidget

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-c8f24c578dcb> in <module>()
----> 1 from niwidgets import NiftiWidget

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/niwidgets/__init__.py in <module>()
      8 from .exampledata import exampleatlas, examplezmap, examplet1  # noqa: F401
      9 from .niwidget_volume import NiftiWidget  # noqa: F401
---> 10 from .niwidget_surface import SurfaceWidget  # noqa: F401
     11 from .streamlines import StreamlineWidget  # noqa: F401

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/niwidgets/niwidget_surface.py in <module>()
      6 from xml.parsers.expat import ExpatError
      7 
----> 8 import ipyvolume.pylab as p3
      9 import matplotlib.pyplot as plt
     10 import nibabel as nb

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/ipyvolume/__init__.py in <module>()
      3 
      4 from . import styles
----> 5 from .widgets import *
      6 from .transferfunction import *
      7 from . import examples

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/ipyvolume/widgets.py in <module>()
      8 import logging
      9 import numpy as np
---> 10 from .serialize import array_cube_tile_serialization, array_serialization, array_sequence_serialization,\
     11     color_serialization, image_serialization, texture_serialization
     12 from .transferfunction import *

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/ipyvolume/serialize.py in <module>()
      7 from . import utils
      8 import ipywidgets
----> 9 import ipywebrtc
     10 import numpy as np
     11 import PIL.Image

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/ipywebrtc/__init__.py in <module>()
      3 import ipywidgets as widgets
      4 from ._version import version_info, __version__
----> 5 from .webrtc import *
      6 
      7 

/home/arman/anaconda/envs/development/lib/python3.6/site-packages/ipywebrtc/webrtc.py in <module>()
     10     Bool, Bytes, Dict, Instance, Int, List, TraitError, Unicode, validate
     11 )
---> 12 from ipywidgets import DOMWidget, Image, Video, Audio, register, widget_serialization
     13 from ipython_genutils.py3compat import string_types
     14 import ipywebrtc._version

ImportError: cannot import name 'Video'

armaneshaghi avatar Sep 26 '18 13:09 armaneshaghi

Having the same issue....

MargaridaMC avatar Nov 05 '18 19:11 MargaridaMC

Thanks for the update and apologies for not fixing this sooner. I believe this must have been an ipyvolume update - ill take a look.

On Mon, 5 Nov 2018, 19:52 MargaridaMC <[email protected] wrote:

Having the same issue....

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nipy/niwidgets/issues/49#issuecomment-436012306, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5yCTd83tHqtwuei7k-g8YSic_qDJOWks5usJb-gaJpZM4W6r1L .

janfreyberg avatar Nov 05 '18 20:11 janfreyberg

Actually, the issue for me was that I didn't have Node.js installed and this is requirement for ipywebrtc apparently. It's working now :)

MargaridaMC avatar Nov 05 '18 20:11 MargaridaMC

I also got this error occurs when trying to run this repo in MyBinder.

The issue there was an outdated ipywidgets package, fixed by creating a requirements.txt file with the entry:

ipywidgets>=7.4.0

psychemedia avatar Dec 07 '18 17:12 psychemedia