Help! ValueError

159 views
Skip to first unread message

ariel tulian

unread,
Sep 9, 2017, 12:03:55 PM9/9/17
to VPython-users
Good morning sorry for my English, I previously installed vpython without problems but I had to format thanks to Windows and when reinstalling vpython I get the following error in materials.py:

Type "help", "copyright", "credits" or "license" for more information.
>>> import visual
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/visual/__init__.py", line 66, in <module>
    from visual.ui import display
  File "/usr/lib/python2.7/dist-packages/visual/ui.py", line 3, in <module>
    import materials
  File "/usr/lib/python2.7/dist-packages/visual/materials.py", line 152, in <module>
    tx_turb3 = raw_texture( data=reshape(data,(64,64,64,3)), interpolate=True, mipmap=False )
  File "/usr/lib/python2.7/dist-packages/visual/materials.py", line 70, in __init__
    self.__setattr__(key, value)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Thank you very much.
Greetings.
Ariel Tulian

Bruce Sherwood

unread,
Sep 9, 2017, 1:07:25 PM9/9/17
to VPython-users
It appears that you have installed the visual module on Linux. I don't know what the problem is, but I recommend installing the vpython module instead, as installation of the older Classic VPython on Linux has always been difficult, whereas it is usually easy to install the vpython module. See the first page of vpython.org. I would also recommend installing Anaconda with Python 3.


Reply all
Reply to author
Forward
0 new messages