I have downloaded vpython and try to run one of the examples included with the program.

from visual import *

floor = box(length=4, height=0.5, width=4, color=color.blue)

ball = sphere(pos=(0,4,0), color=color.red)
ball.velocity = vector(0,-1,0)

dt = 0.01
while 1:
    rate(100)
    ball.pos = ball.pos + ball.velocity*dt
    if ball.y < 1:
        ball.velocity.y = -ball.velocity.y
    else:
        ball.velocity.y = ball.velocity.y - 9.8*dt

but this is the error I get

Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\visual\examples\bounce.py", line 1
    from visual import *
  File "C:\Python26\lib\site-packages\visual\__init__.py", line 59
    import cvisual
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only
>>>

, when I run it on my dell inspiron 1525 laptop with windows vista. I have tried it on another computer and have seen it work, but would like it to work on my laptop. I have the relatively latest 2.6.3 python installed on the laptop. And have tried uninstalling python and vpython a couple of times but the error continues does anyone have any ideas how to fix this?

Re: Vpython error won't run any programs 80 80

I assume you used the Windows installer
VPython-Win-Py2.6-5.12.exe
not quite sure if that needs numpy too. I don't use Python26.

The example works very well with Python25.

Re: Vpython error won't run any programs 80 80

Yes I did as per the instructions on the vpython download page.

Re: Vpython error won't run any programs 80 80

I have read that Vista has a nasty habit not to install certain files because of its childish security concerns, and it won't let the user know about it.

My advice, get rid of Vista as soon as you can.

Re: Vpython error won't run any programs 80 80

My advice, get rid of Vista as soon as you can.

And if that's not an option make sure you're both installing and running all these things by right-clicking the executable and selecting "Run as Administrator"

Re: Vpython error won't run any programs 80 80

And if that's not an option make sure you're both installing and running all these things by right-clicking the executable and selecting "Run as Administrator"

Thanks for the info, hope it works for the OP. I have been sitting out Vista successfully so far, and probably will never have the pleasure to try this out. Eventually I will have to bite the bullet and use Windows 7 or Windows 7.1.

Re: Vpython error won't run any programs 80 80

I have the same problem with macosx. Any news about this problem?
Thanks

Re: Vpython error won't run any programs 80 80

I had the same problem, except that I'm running Vista Buisiness, and I don't have the option to right-click and "Run as Administrator," and the same program doesn't work. I would appreciate some assistance.

Re: Vpython error won't run any programs 80 80

I have Windows Vista Business Premium 32-bit, I think, and I tried to run this program in VPython:

from visual import *
checkerboard = ( (0,1,0,1), 
                 (1,0,1,0),
                 (0,1,0,1),
                 (1,0,1,0) )
tex = materials.texture(data=checkerboard,
                     mapping="rectangular",
                     interpolate=False)
box(axis=(0,0,1), color=color.cyan, material=tex)

but all I get is a blank Cyan color box with no checkerboard, what can I do in order to either update my system or get a new system?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.