Bug in GlowScript 3.2 on Apple Safari

183 views
Skip to first unread message

juan_ki...@outlook.com

unread,
Dec 9, 2021, 12:34:55 PM12/9/21
to VPython-users
I've run across an interesting bug in GlowScript 3.2.  If I run the following script in Safari (Version 14.1.2 (14611.3.10.1.7)) with Content Blockers disabled:

GlowScript 3.2 VPython
origin = vec(0,0,0) # Location of origin
L = 200             # Length of axes in meters
xAxis = cylinder(pos=origin-vec(L/2,0,0), axis=vec(L,0,0), radius=0.5)


The program crashes with a "Error: Can't create canvas: WebGL not supported".  The error doesn't occur in Google Chrome.  It also does not occur if I simply replace the "GlowScript 3.2 VPython" line with "GlowScript 3.0 Python" or "GlowScript 3.1 Python"!  What changed in version 3.2 of GlowScript to trigger this bug?

Steve Spicklemire

unread,
Dec 9, 2021, 12:56:13 PM12/9/21
to vpytho...@googlegroups.com, Steve Spicklemire
Maybe try updating Safari? Glowscript 3.2 updated WebGL to v2.

https://caniuse.com/webgl2
> --
> You received this message because you are subscribed to the Google Groups "VPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vpython-users/624ef34e-0fe6-434d-a617-b9cc080edf7fn%40googlegroups.com.

Bruce Sherwood

unread,
Dec 9, 2021, 1:02:30 PM12/9/21
to VPython-users
This happened to another user a week or so ago. It turned out in that case that the problem was that Safari needed to be updated, though the user was also able to fix the problem by finding (I don't know how) an option in the old Safari to enable WebGL 2, which Web VPython now uses.

Bruce

Joe Heafner

unread,
Dec 9, 2021, 1:13:00 PM12/9/21
to Users VPython

> On Dec 9, 2021, at 13:02, Bruce Sherwood <bruce.s...@gmail.com> wrote:
>
> This happened to another user a week or so ago. It turned out in that case that the problem was that Safari needed to be updated, though the user was also able to fix the problem by finding (I don't know how) an option in the old Safari to enable WebGL 2, which Web VPython now uses.

If Safari’s Develop menu is enabled, there’s an option under Experimental Features to use WebGL 2.0. This works in both Mobile Safari and desktop Safari.

Joe Heafner
Sent from one of my Macs


Floyd James

unread,
Feb 28, 2022, 11:57:38 AM2/28/22
to VPython-users
Thanks for the information.  I ran into this problem this weekend.  I am running Python 3.7.6, installed with Anaconda.  This weekend the vpython module stopped working on Mac computers running Mohave or earler.  Safari 14.1.2 is the latest version that works on Mohave.  The directions to enable the safari developer menu and then enabling WebGL 2.0 worked on Safari 14.1.2 and Safari 13.1.  Vpyhon is working again.  Thanks for the info.

Floyd James

Reply all
Reply to author
Forward
0 new messages