Jump to content

How to clear a TypeError?


Recommended Posts

I am getting frequent errors that do not clear after I edit the module. Python continues to present the error at the end of the Error Output file after the error has been corrected. The errors are in modules I've written that I am importing into a larger program. How can I reset the Python engine to move past this?

Example:

aVar = Tuple1 - Tuple2

Error received:

TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'

So I change the operator to "+":

aVar = Tuple1 + Tuple2

but on the next execution I get the same error:

TypeError: unsupported operand type(s) for -: 'tuple' and 'tuple'

This seems to happen with any "TypeError" I get in an imported module. They do not clear unless I restart VW.

I have tried:

import Polys

from imp import reload

reload (Polys)

to no avail. Also, turning ON and OFF the "Run scripts in developer mode" pref has no effect. The only thing I have found to work is restarting VW. There has got to be a simple way I am unaware of.

TIA,

Raymond

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...