Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Task exception was never retrieved" and "TypeError" while zooming #14

Open
bewantbe opened this issue Jul 23, 2019 · 4 comments
Open

Comments

@bewantbe
Copy link

Steps to reproduce:
(use Chrome/Firefox as the default browser)
(in Win10 cmdline)

D:\code\py>python
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import vpython
>>> vpython.__version__
'7.5.1'
>>> vpython.sphere()
<vpython.vpython.sphere object at 0x000001FB85AD1A90>
>>>

Now a browser is opened and the sphere is shown correctly. Zoom in the object sufficiently (probably with other operations, with touch screen), the following will then repeatedly shown:

Task exception was never retrieved
future: <Task finished coro=<WSserver.onMessage() done, defined at C:\Users\xyy82\AppData\Roaming\Python\Python36\site-packages\vpython\no_notebook.py:154> exception=TypeError('must be real number, not NoneType',)>
Traceback (most recent call last):
  File "C:\Users\xyy82\AppData\Roaming\Python\Python36\site-packages\vpython\no_notebook.py", line 187, in onMessage
	await loop.run_in_executor(None, GW.handle_msg, msg)
  File "C:\Program Files\Python36\lib\concurrent\futures\thread.py", line 56, in run
	result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\xyy82\AppData\Roaming\Python\Python36\site-packages\vpython\vpython.py", line 393, in handle_msg
	cvs.handle_event(evt)
  File "C:\Users\xyy82\AppData\Roaming\Python\Python36\site-packages\vpython\vpython.py", line 3159, in handle_event
	evt['pos'] = list_to_vec(pos)
  File "C:\Users\xyy82\AppData\Roaming\Python\Python36\site-packages\vpython\vpython.py", line 177, in list_to_vec
	return vector(L[0], L[1], L[2])
  File "vpython/cyvector.pyx", line 29, in vpython.cyvector.vector.__init__
TypeError: must be real number, not NoneType
@BruceSherwood
Copy link
Member

I verify seeing this error. As you imply, the bug appears only if zooming by touching the screen, not if using a mouse or touch pad. No idea what the cause is.

@BruceSherwood
Copy link
Member

I verify that the same bug occurs with GlowScript VPython, so it is a problem with the GlowScript library, not with the Python code.

@bewantbe
Copy link
Author

Should I file another bug in vpython/glowscript? Note that all I know about glowscript is it's the backend of the vpython, actually I don't even know how to reproduce this bug directly in glowscript.

I use touch screen often, so fixing this bug would have a great help to me.

PS: it is very nice to see that vpython is now again as easy to use as the old python module visual. Thank you for your works.

@BruceSherwood
Copy link
Member

No need to file another report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants