954,116 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Vpython error won't run any programs

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?

johndb
Newbie Poster
12 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

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.

vegaseat
DaniWeb's Hypocrite
Moderator
5,976 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,416
 

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

johndb
Newbie Poster
12 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

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.

vegaseat
DaniWeb's Hypocrite
Moderator
5,976 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,416
 
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"

jlm699
Veteran Poster
1,112 posts since Jul 2008
Reputation Points: 355
Solved Threads: 292
 
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.

vegaseat
DaniWeb's Hypocrite
Moderator
5,976 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,416
 

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

edup
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 
rev087
Newbie Poster
1 post since Jan 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You