<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.physicsbook.gatech.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lucasec</id>
	<title>Physics Book - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.physicsbook.gatech.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lucasec"/>
	<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/Special:Contributions/Lucasec"/>
	<updated>2026-04-10T11:42:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=12538</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=12538"/>
		<updated>2015-12-04T21:03:33Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian)&lt;br /&gt;
&lt;br /&gt;
Programming languages can often generate obscure and confusing error messages, and VPython is no exception.  This reference lists out the most common types of errors students encounter, with a brief explanation of why they happen and how to fix them.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want (provided it is valid syntax), &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=12532</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=12532"/>
		<updated>2015-12-04T21:01:49Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* TypeError: &amp;#039;*&amp;#039; object is not callable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want (provided it is valid syntax), &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=12530</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=12530"/>
		<updated>2015-12-04T21:01:27Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* TypeError: &amp;#039;*&amp;#039; object is not callable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want (provided it follows some basic rules), &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Functions_and_Lists&amp;diff=11984</id>
		<title>VPython Functions and Lists</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Functions_and_Lists&amp;diff=11984"/>
		<updated>2015-12-04T15:45:33Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;THIS IS A WORK IN PROGRESSS by Kevin Randrup. I will remove this when the page is completed.&lt;br /&gt;
&lt;br /&gt;
PLEASE DO NOT EDIT THIS PAGE. COPY THIS TEMPLATE AND PASTE IT INTO A NEW PAGE FOR YOUR TOPIC.&lt;br /&gt;
&lt;br /&gt;
Short Description of Topic&lt;br /&gt;
&lt;br /&gt;
==VPython Functions and Lists==&lt;br /&gt;
&lt;br /&gt;
State, in your own words, the main idea for this topic&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A Mathematical Model===&lt;br /&gt;
&lt;br /&gt;
What are the mathematical equations that allow us to model this topic.  For example &amp;lt;math&amp;gt;{\frac{d\vec{p}}{dt}}_{system} = \vec{F}_{net}&amp;lt;/math&amp;gt; where &#039;&#039;&#039;p&#039;&#039;&#039; is the momentum of the system and &#039;&#039;&#039;F&#039;&#039;&#039; is the net force from the surroundings.&lt;br /&gt;
&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
&lt;br /&gt;
How do we visualize or predict using this topic. Consider embedding some vpython code here [https://trinket.io/glowscript/31d0f9ad9e Teach hands-on with GlowScript]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Be sure to show all steps in your solution and include diagrams whenever possible&lt;br /&gt;
&lt;br /&gt;
===Simple===&lt;br /&gt;
===Middling===&lt;br /&gt;
===Difficult===&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Put this idea in historical context. Give the reader the Who, What, When, Where, and Why.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
[http://www.scientificamerican.com/article/bring-science-home-reaction-time/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Multithreading&amp;diff=11983</id>
		<title>VPython Multithreading</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Multithreading&amp;diff=11983"/>
		<updated>2015-12-04T15:45:09Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Claimed by Philip Bale&lt;br /&gt;
&lt;br /&gt;
Here we discuss multithreading as it relates to advanced VPython physics computations&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Multithreading is the ability to execute multiple processes (or threads) concurrently.  Instead of a single execution flow, multiple program paths may be followed at once.  With multithreading, programs may no longer be executed strictly in a linear manner.  The notion of multithreaded parallelism in computing is similar to multitasking in real life--the idea is to get more done at once.&lt;br /&gt;
&lt;br /&gt;
Multithreading is very important to VPython.  Imagine a Solar System model.  Though it would be possible to model and update the entire system in a linear fashion, when it comes to movement and animation, the computation can get incredibly intense.  Since your computer shares it&#039;s process cycles with various other programs, you may notice significant lag while trying to achieve your task.  Multithreading, however, would allow you to model and update each Planet (or even subsystems of a planet, etc.) concurrently.  For a system of thousands of relevant objects, the speed improvement could be many orders of magnitude with multithreading.&lt;br /&gt;
&lt;br /&gt;
As an analogy, think of multithreading as a single employee vs. an assembly line.  A car could simply be worked on by a singular person.  It may also, however, be worked on by multiple people performing their own tasks at the same time.  The idea of multiple tasks being executed at the same time is the essence of multithreading.&lt;br /&gt;
&lt;br /&gt;
===Advantages===&lt;br /&gt;
Multithreading allows advanced and complex computations to be performed more efficiently due to concurrency.  The asynchronous potential of multithreaded programs supports smoother graphical renderings and more accurate user input as well.  While one thread is performing mathematical computations, another could be rendering models on screen, while another is taking user input.  The modularity of threading allows users to break down processes as they see fit.  Furthermore, various threads may share global objects.  This allows for mutual cooperation and sharing when necessary.  Threads are also light-weight and cheaper than processes.  Since threads can be interrupted and put on hold, they also afford a good amount of flexibility.&lt;br /&gt;
&lt;br /&gt;
===Disadvantages===&lt;br /&gt;
With multithreading comes risks and disadvantage--though not to be thought as zero-sum.  There are cases when breaking up a single process into multiple threads is more costly due to memory and resource allocations.  From a programming standpoint, multithreaded applications are also more complex in terms of time and logic.  Thread scheduling can also cause program locks if not executed correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
===Thread Library===&lt;br /&gt;
===Thread Creation===&lt;br /&gt;
===Thread Synchronization===&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Be sure to show all steps in your solution and include diagrams whenever possible&lt;br /&gt;
&lt;br /&gt;
===Simple===&lt;br /&gt;
===Middling===&lt;br /&gt;
===Difficult===&lt;br /&gt;
===A Computational Model===&lt;br /&gt;
&lt;br /&gt;
How do we visualize or predict using this topic. Consider embedding some vpython code here [https://trinket.io/glowscript/31d0f9ad9e Teach hands-on with GlowScript]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
#How is this topic connected to something that you are interested in?&lt;br /&gt;
#How is it connected to your major?&lt;br /&gt;
#Is there an interesting industrial application?&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Multithreading first appeared in 1967 in OS/360 Multiprogramming with a Variable Number of Tasks or MVT.  This time-sliced system allowed &amp;quot;tasks&amp;quot; to be run simultaneously.  Timesharing at this point referred to multiple users sharing a single machine at different times.  This MVT, however, allowed for a new definition of timesharing applications.[https://en.wikipedia.org/wiki/OS/360_and_successors#MVT]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
Are there related topics or categories in this wiki resource for the curious reader to explore?  How does this topic fit into that context?&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Books, Articles or other print media on this topic&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
[http://www.scientificamerican.com/article/bring-science-home-reaction-time/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_basics&amp;diff=11982</id>
		<title>VPython basics</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_basics&amp;diff=11982"/>
		<updated>2015-12-04T15:44:45Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Claimed by Liubov Nikolenko&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a beginner guide to programming in VPython. If you have never written code before, this article is for you. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:EMWave-Maxwell v275.gif]]&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
To install VPython simply follow the instructions in the links given below. After the installation is completed just open the VIDLE for Python (usually there is a shortcut created on your desktop) and start typing your code.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
Install VPython [http://vpython.org/contents/download_windows.html here]&lt;br /&gt;
&lt;br /&gt;
===OSX===&lt;br /&gt;
&lt;br /&gt;
Install VPython [http://vpython.org/contents/download_mac.html here]&lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
&lt;br /&gt;
Install VPython [http://vpython.org/contents/download_linux.html here]&lt;br /&gt;
&lt;br /&gt;
==Getting started with Python==&lt;br /&gt;
Introduction to basic Python use&lt;br /&gt;
&lt;br /&gt;
The first two lines of your program should be:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
::from __future__ import division&lt;br /&gt;
::from visual import *&amp;lt;/code&amp;gt;&lt;br /&gt;
The first line enables float division, so 3 / 2 = 1.5 (not 1) and the second line enables graphics module.&lt;br /&gt;
===Variables===&lt;br /&gt;
One of the most powerful features of a programming language is the ability to manipulate variables. A variable is a name that refers to a value. In order to assign some value to a variable, you should use the assignment token &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; . &lt;br /&gt;
For example, &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
x = 5 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line of code assigns the variable x the value 5. &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
y = 0&lt;br /&gt;
&lt;br /&gt;
x = y&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line of code assigns the variable x the value associated with y, so x is equal to 0. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; unlike equality operator you cannot interchange the variables on different sides of the equality sign. &lt;br /&gt;
Say, our initial conditions are: &lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
x = 5&lt;br /&gt;
&lt;br /&gt;
y = 0&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement &amp;lt;code&amp;gt;x = y&amp;lt;/code&amp;gt; assigns the variable x value 0, while the statement &amp;lt;code&amp;gt;y = x&amp;lt;/code&amp;gt; assigns the variable y value 5.&lt;br /&gt;
&lt;br /&gt;
===Creating VPython Objects===&lt;br /&gt;
*[http://vpython.org/contents/docs/sphere.html Sphere]&lt;br /&gt;
[[File:Sphere.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ball = sphere(pos=(x_coordinate,y_coordinate,z_coordinate), radius=radius_of_the_sphere, color = color.color_of_the_sphere)&amp;lt;/code&amp;gt;&lt;br /&gt;
*[http://vpython.org/contents/docs/arrow.html Arrow]&lt;br /&gt;
[[File:Arrow1.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;myArrow = arrow(pos=(x0_coordinate,y0_coordinate,z0_coordinate), axis=(x1_coordinate,y1_coordinate,z1_coordinate), color = color.color_of_the_arrow)&amp;lt;/code&amp;gt;&lt;br /&gt;
*[http://vpython.org/contents/docs/vector.html Vector]&lt;br /&gt;
&amp;lt;code&amp;gt;myVector = vector(x_coordinate,y_coordinate,z_coordinate)&amp;lt;/code&amp;gt;&lt;br /&gt;
*[http://vpython.org/contents/docs/trail.html Trail]&lt;br /&gt;
[[File:Trail1.jpg]]&lt;br /&gt;
&lt;br /&gt;
You can leave a trail behind a moving object simply by specifying &amp;lt;code&amp;gt;make_trail=True&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ball.make_trail = True&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each time you change ball.pos, this new position is added to a curve, thereby leaving a trail behind the moving sphere. This works with arrow, box, cone, cylinder, ellipsoid, pyramid, ring, and sphere.&lt;br /&gt;
&lt;br /&gt;
===Manipulating VPython values===&lt;br /&gt;
*Accessing attributes of the variable&lt;br /&gt;
To access the attribute of a given variable just use the syntax &amp;lt;code&amp;gt;object.attribute&amp;lt;/code&amp;gt; (e.g. to access the position of the ball variable, you should do &amp;lt;code&amp;gt;ball.pos&amp;lt;/code&amp;gt;)&lt;br /&gt;
*Updating variable&lt;br /&gt;
To update a variable (such as time, speed, force or the position of the object) you should do &amp;lt;code&amp;gt;variable = variable + delta&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running VPython code===&lt;br /&gt;
To run VPython code simply press F5. While running your code you will see the visual module and a shell (a place where all print out information is displayed) &lt;br /&gt;
===Loops===&lt;br /&gt;
There are two types of loops that can be use in Python: [https://wiki.python.org/moin/ForLoop for loop] and [https://wiki.python.org/moin/WhileLoop while loop]. Basically, loops are used to tell the computer to execute the same task multiple times. While loops are more common for modeling physics concepts.&lt;br /&gt;
*While loops &lt;br /&gt;
The body of a while loop is executed, while a certain condition is true. Make sure to indent the statements that should be done in the while loop. While loop is equivalent to integration, because it manually breaks down the physical process into small parts and adds them up (see [[Iterative_Prediction | Iterative Prediction]] as a good example of the physical application of a while loop). While loop has the following structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
:while (condition)&lt;br /&gt;
::the body of the while loop&lt;br /&gt;
::updating the loop&amp;lt;/code&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
while (t &amp;lt; 60)&lt;br /&gt;
  distance = distance + velocity * deltat&lt;br /&gt;
  t = t + deltat&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; to see the process clearly it is common to slow down the frame rate by using &#039;&#039;rate(200)&#039;&#039; as a first line of a body of the while loop&lt;br /&gt;
&lt;br /&gt;
===Comments===&lt;br /&gt;
Comments in the code have no impact on the code execution, because they are just ignored by the computer. Comments in VPython start with a pound sign (#) and end when a line ends. It is a good practice to place some useful information (like an explanation to a certain step) in the comments, so other people will find it easier to understand your code. For example:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
x = x + 1 # incrementing x variable&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Debugging techniques===&lt;br /&gt;
Unfortunately, sometimes programs do not work in a way we intended them to work. Here are some tips to fixing your code. &lt;br /&gt;
#If you get an error try to understand the error message and fix your code accordingly. The most common errors are syntax errors, like parenthesis mismatch or wrong arguments passed into the function. &lt;br /&gt;
#Make sure you updating your condition for a while loop, so you don&#039;t have an infinite loop. &lt;br /&gt;
#Check if your are dividing by zero anywhere. &lt;br /&gt;
#Make sure you have correct indentation everywhere. &lt;br /&gt;
#Put plenty of &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statements, so you can know what is going on in every single stage of your code.&lt;br /&gt;
#Check your mathematical expressions for the order of precedence (e.g. &amp;lt;code&amp;gt;x / (y * z)&amp;lt;/code&amp;gt; is &#039;&#039;&#039;not&#039;&#039;&#039; equivalent to &amp;lt;code&amp;gt;x / y * z&amp;lt;/code&amp;gt;)&lt;br /&gt;
#Try commenting out some steps to see which parts of your code do not work.&lt;br /&gt;
&lt;br /&gt;
===Useful built-in functions===&lt;br /&gt;
====Printing out information====&lt;br /&gt;
*&amp;lt;code&amp;gt;print(value)&amp;lt;/code&amp;gt;&lt;br /&gt;
Prints out the given value in the programming shell.&lt;br /&gt;
&lt;br /&gt;
====Math====&lt;br /&gt;
*&amp;lt;code&amp;gt;x**y&amp;lt;/code&amp;gt;&lt;br /&gt;
Raises x to the y-th power.&lt;br /&gt;
&lt;br /&gt;
===Vectors===&lt;br /&gt;
*&amp;lt;code&amp;gt;cross(vectorA, vectorB)&amp;lt;/code&amp;gt;&lt;br /&gt;
Calculates the cross product of two vectors&lt;br /&gt;
*&amp;lt;code&amp;gt;mag(vector)&amp;lt;/code&amp;gt;&lt;br /&gt;
Calculates the magnitude of the vector&lt;br /&gt;
*&amp;lt;code&amp;gt;norm(vector)&amp;lt;/code&amp;gt;&lt;br /&gt;
Calculates the unit vector of the vector&lt;br /&gt;
*&amp;lt;code&amp;gt;dot(vector_1, vector_2)&amp;lt;/code&amp;gt;&lt;br /&gt;
Calculates the dot product of two vectors&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
&lt;br /&gt;
How is this topic connected to something that you are interested in?&lt;br /&gt;
&lt;br /&gt;
I like coding and I would love more people to share my passion, so I tried my best to make the coding part of physics more approachable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How is it connected to your major?&lt;br /&gt;
&lt;br /&gt;
I am CS major and Python was the first language I have learned at Tech.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Is there an interesting industrial application?&lt;br /&gt;
&lt;br /&gt;
Every simulation starting from interaction of molecules can be modeled in VPython to get the general idea of the process.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
===GlowScript===&lt;br /&gt;
[http://www.glowscript.org/ GlowScript] is an easy-to-use, powerful environment for creating 3D animations and publishing them on the web. You can write and run GlowScript programs right in your browser, store them in the cloud for free, and easily share them with others. GlowScript uses VPython as a programming language. One of the greatest strengths of GlowScript is that is does not require any pre-installed software and can be ran from any computer.&lt;br /&gt;
&lt;br /&gt;
===General Overview of VPython===&lt;br /&gt;
[[VPython]]&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
[http://vpython.org/ The official VPython website with the links to YouTube tutorials]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/doc.html Documentation]&lt;br /&gt;
&lt;br /&gt;
[https://groups.google.com/forum/?fromgroups&amp;amp;hl=en#!forum/vpython-users VPython User forum]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
1. [http://openbookproject.net/thinkcs/python/english3e/index.html Python tutorial]&lt;br /&gt;
&lt;br /&gt;
2. [http://vpython.wikidot.com/ VPython Wiki Site]&lt;br /&gt;
&lt;br /&gt;
3. [http://www.glowscript.org/ GlowScript]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.visualrelativity.com/vpython/ The image source]&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11980</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11980"/>
		<updated>2015-12-04T15:44:22Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython&amp;diff=11977</id>
		<title>VPython</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython&amp;diff=11977"/>
		<updated>2015-12-04T15:44:00Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Claimed by Nathan Cheek&lt;br /&gt;
&lt;br /&gt;
VPython is a Python graphics module used for modeling objects in 3-dimensional space.  In the field of physics, this is especially useful for calculating and modeling complex relationships between objects and their properties.&lt;br /&gt;
&lt;br /&gt;
[[File:VPythonMagneticForceAnimated.gif|thumb|VPython modeling the magnetic force on a moving particle]]&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
VPython is compatible with Windows, OSX, and Linux.  While there is an older VPython version available that supports Python 3, the Georgia Tech physics courses use Python 2 syntax so it is recommended to install the latest version of VPython as outlined below.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
[[File:VPythonWindows.png|thumb|VPython running in Windows 7]]&lt;br /&gt;
&lt;br /&gt;
1. Install [http://python.org/ftp/python/2.7.9/python-2.7.9.amd64.msi Python-2.7].&lt;br /&gt;
&lt;br /&gt;
2. Download and install VPython from [http://sourceforge.net/projects/vpythonwx/files/6.11-release/VPython-Win-64-Py2.7-6.11.exe/download Sourceforge].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To troubleshoot any installation issues, look at the extensive [http://vpython.org/contents/download_windows.html VPython Windows installation guide].&lt;br /&gt;
&lt;br /&gt;
===OSX===&lt;br /&gt;
[[File:VPythonOSX.png|thumb|VPython running in OSX 10.10]]&lt;br /&gt;
&lt;br /&gt;
1. Install [https://www.python.org/ftp/python/2.7.9/python-2.7.9-macosx10.6.pkg Python-2.7].  This is required as the version of Python that Apple provides is not compatible.&lt;br /&gt;
&lt;br /&gt;
2. Download and install the VPython package from [http://sourceforge.net/projects/vpythonwx/files/6.11-release/VPython-Mac-Py2.7-6.11.dmg/download Sourceforge].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To troubleshoot installation issues, see the extensive [http://vpython.org/contents/download_mac.html VPython Mac installation guide].&lt;br /&gt;
&lt;br /&gt;
===GNU/Linux===&lt;br /&gt;
[[File:VPythonUbuntu.png|thumb|VPython running in Ubuntu 15.04]]&lt;br /&gt;
&lt;br /&gt;
Some Linux distributions include VPython in their repositories.  For example, to install VPython in Ubuntu 15.04:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install python-visual&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If your Linux distribution&#039;s repository does not have the latest version of VPython, you can run the Windows version using [https://www.winehq.org/ Wine].  The [http://vpython.org/contents/download_linux.html VPython Linux installation guide] contains detailed instructions.&lt;br /&gt;
&lt;br /&gt;
==Getting started with VPython==&lt;br /&gt;
The easiest way to use VPython is with VIDLE.  VIDLE is a development environment and is the most useful for editing and running code.  To start, open the VIDLE application (it may be called something like VIDLE-Py2.7).  A blank file should open.  Type the following two lines in:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;from __future__ import division&lt;br /&gt;
&lt;br /&gt;
from visual import *&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first line tells Python to not use integer division, which would result in &amp;lt;code&amp;gt;1/3&amp;lt;/code&amp;gt; returning the floor &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;0.3333333333333333&amp;lt;/code&amp;gt;.  The second line tells Python to import everything from the visual (VPython) library for you to use.&lt;br /&gt;
&lt;br /&gt;
After these two lines, you can create objects, assign variables, do calculations, and much more.  You can also run VPython from the command line, although it may require additional setup so Python can locate the &amp;lt;code&amp;gt;visual&amp;lt;/code&amp;gt; module.&lt;br /&gt;
&lt;br /&gt;
==Creating VPython Objects==&lt;br /&gt;
When you create objects, it is often useful to assign them to variables so you can reference them later to either get or set values describing for example the position and size of the object.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sphere&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;particle = sphere(pos=(0,0,0), radius=4, color=color.blue)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a blue sphere centered at the origin &amp;lt;0,0,0&amp;gt; with radius 4.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Arrow&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;arrowToOrigin = arrow(pos=(0,2,0), axis=(0,8,0), color=color.green)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a green arrow pointing from &amp;lt;0,2,0&amp;gt; to &amp;lt;0,10,0&amp;gt;.  Note that &amp;lt;code&amp;gt;axis&amp;lt;/code&amp;gt; is always relative to the start of the arrow, not the origin &amp;lt;0,0,0&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cylinder&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wire = cylinder(pos=(0,0,0), axis=(20,0,0), radius=1, color=color.yellow)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This creates a yellow cylinder starting at the origin &amp;lt;0,0,0&amp;gt; and extending to &amp;lt;20,0,0&amp;gt; with radius 1.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
[[File:VPythonObjects.png|thumb|Result of example code]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
from __future__ import division&lt;br /&gt;
from visual import *&lt;br /&gt;
&lt;br /&gt;
particle = sphere(pos=(0,0,0), radius=4, color=color.blue)&lt;br /&gt;
arrowToOrigin = arrow(pos=(0,2,0), axis=(0,8,0), color=color.green)&lt;br /&gt;
wire = cylinder(pos=(0,0,0), axis=(20,0,0), radius=1, color=color.yellow)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Updating objects&#039;&#039;&#039;&lt;br /&gt;
If you assign an object to a variable (such as &amp;lt;code&amp;gt;particle&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;arrowToOrigin&amp;lt;/code&amp;gt; above) you can adjust its parameters such as its location.  For the above sphere, you can change its location to &amp;lt;-5,-5,0&amp;gt; with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;particle.pos=(-5,-5,0)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the axis of the above arrow to point to &amp;lt;-10,5,0&amp;gt;, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;arrowToOrigin.axis=(-10,5,0)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the radius of the above cylinder to 3, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wire.radius=3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
[[File:VPythonObjectsChanged.png|thumb|Result of example code]]&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
from __future__ import division&lt;br /&gt;
from visual import *&lt;br /&gt;
&lt;br /&gt;
particle = sphere(pos=(0,0,0), radius=4, color=color.blue)&lt;br /&gt;
arrowToOrigin = arrow(pos=(0,2,0), axis=(0,8,0), color=color.green)&lt;br /&gt;
wire = cylinder(pos=(0,0,0), axis=(20,0,0), radius=1, color=color.yellow)&lt;br /&gt;
&lt;br /&gt;
particle.pos=(-5,-5,0)&lt;br /&gt;
arrowToOrigin.axis=(-10,5,0)&lt;br /&gt;
wire.radius=3&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful built-in functions==&lt;br /&gt;
&lt;br /&gt;
VPython includes various functions that can make your calculations much easier.  The following functions simplify mathematical operations on vectors and will come in handy very often.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cross-multiply two vectors&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cross(vectorA, vectorB)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Magnitude of a vector&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;mag(vector)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unit vector of a vector&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;norm(vector)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Connectedness==&lt;br /&gt;
&lt;br /&gt;
I am very interested in programming.  I have used Python for years, so translating Physics problems into VPython code is a great way to cement the fundamental ideas in my mind.&lt;br /&gt;
&lt;br /&gt;
VPython is a great tool to bridge the worlds of Computer Science and Physics.  Many of the calculations required to model a physical object would be tedious if done by hand.  Yet with often a few lines of code, this work can be reduced to almost nothing.&lt;br /&gt;
&lt;br /&gt;
NASA has published [http://gcmd.gsfc.nasa.gov/KeywordSearch/Metadata.do?Portal=GCMD&amp;amp;MetadataType=1&amp;amp;MetadataView=Full&amp;amp;KeywordPath=&amp;amp;EntryId=3-D_ES-Models VPython models].  However, VPython is still primarily used in an educational context.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
VPython was originally released in 2000 by David Scherer after he took an introductory physics class at Carnegie Mellon University.  At the time, the school used the cT programming language for 2D modeling, and David saw the need for something better.  Working with several people including professors Ruth Chabay and Bruce Sherwood, he developed a Python module called Visual.  Visual Python or VPython featured 3D modeling, as well as an easier-to-understand object-oriented syntax.  Beginning in 2002, the National Science Foundation had awarded $292,286.00 as of December 2015 for the further development of this tool.  VPython is released under an Open Source license, and development continues today.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
If you have never used Python, the [[VPython_basics| VPython Basics]] wiki page has information for getting started with Python programming.&lt;br /&gt;
&lt;br /&gt;
===Further reading===&lt;br /&gt;
&lt;br /&gt;
Aiken, John M (2013). &#039;&#039;Transforming High School Physics With Modeling And Computation&#039;&#039;. Georgia State University.&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[http://www.wired.com/2015/08/coding-physics-course/ You Should Be Coding in Your Physics Course]&lt;br /&gt;
&lt;br /&gt;
[http://vpython.wikidot.com/ VPython Wiki Site]&lt;br /&gt;
&lt;br /&gt;
[https://groups.google.com/forum/#!forum/vpython-users VPython user group]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
This section contains the the references you used while writing this page&lt;br /&gt;
&lt;br /&gt;
[http://vpython.org/contents/cTsource/cToverview.html The cT Programming Language]&lt;br /&gt;
&lt;br /&gt;
[https://wiki.python.org/moin/VPython/ VPython - Python Wiki]&lt;br /&gt;
&lt;br /&gt;
[http://www.nsf.gov/awardsearch/showAward?AWD_ID=0237132 VPython NSF Award]&lt;br /&gt;
&lt;br /&gt;
[[Category:VPython]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Main_Page&amp;diff=11959</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Main_Page&amp;diff=11959"/>
		<updated>2015-12-04T15:32:27Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Modeling with VPython */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Welcome to the Georgia Tech Wiki for Intro Physics.  This resources was created so that students can contribute and curate content to help those with limited or no access to a textbook.  When reading this website, please correct any errors you may come across. If you read something that isn&#039;t clear, please consider revising it!&lt;br /&gt;
&lt;br /&gt;
Looking to make a contribution?&lt;br /&gt;
#Pick a specific topic from intro physics&lt;br /&gt;
#Add that topic, as a link to a new page, under the appropriate category listed below by editing this page.&lt;br /&gt;
#Copy and paste the default [[Template]] into your new page and start editing.&lt;br /&gt;
&lt;br /&gt;
Please remember that this is not a textbook and you are not limited to expressing your ideas with only text and equations.  Whenever possible embed: pictures, videos, diagrams, simulations, computational models (e.g. Glowscript), and whatever content you think makes learning physics easier for other students.&lt;br /&gt;
&lt;br /&gt;
== Source Material ==&lt;br /&gt;
All of the content added to this resource must be in the public domain or similar free resource.  If you are unsure about a source, contact the original author for permission. That said, there is a surprisingly large amount of introductory physics content scattered across the web.  Here is an incomplete list of intro physics resources (please update as needed).&lt;br /&gt;
* A physics resource written by experts for an expert audience [https://en.wikipedia.org/wiki/Portal:Physics Physics Portal]&lt;br /&gt;
* A wiki book on modern physics [https://en.wikibooks.org/wiki/Modern_Physics Modern Physics Wiki]&lt;br /&gt;
* The MIT open courseware for intro physics [http://ocw.mit.edu/resources/res-8-002-a-wikitextbook-for-introductory-mechanics-fall-2009/index.htm MITOCW Wiki]&lt;br /&gt;
* An online concept map of intro physics [http://hyperphysics.phy-astr.gsu.edu/hbase/hph.html HyperPhysics]&lt;br /&gt;
* Interactive physics simulations [https://phet.colorado.edu/en/simulations/category/physics PhET]&lt;br /&gt;
* OpenStax algebra based intro physics textbook [https://openstaxcollege.org/textbooks/college-physics College Physics]&lt;br /&gt;
* The Open Source Physics project is a collection of online physics resources [http://www.opensourcephysics.org/ OSP]&lt;br /&gt;
* A resource guide compiled by the [http://www.aapt.org/ AAPT] for educators [http://www.compadre.org/ ComPADRE]&lt;br /&gt;
&lt;br /&gt;
== Organizing Categories ==&lt;br /&gt;
These are the broad, overarching categories, that we cover in two semester of introductory physics.  You can add subcategories or make a new category as needed.  A single topic should direct readers to a page in one of these catagories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
===Interactions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Kinds of Matter]]&lt;br /&gt;
**[[Ball and Spring Model of Matter]]&lt;br /&gt;
*[[Detecting Interactions]]&lt;br /&gt;
*[[Fundamental Interactions]]&lt;br /&gt;
*[[Determinism]]&lt;br /&gt;
*[[System &amp;amp; Surroundings]] &lt;br /&gt;
*[[Newton&#039;s First Law of Motion]]&lt;br /&gt;
*[[Newton&#039;s Second Law of Motion]]&lt;br /&gt;
*[[Newton&#039;s Third Law of Motion]]&lt;br /&gt;
*[[Gravitational Force]]&lt;br /&gt;
*[[Electric Force]]&lt;br /&gt;
*[[Conservation of Energy]]&lt;br /&gt;
*[[Conservation of Charge]]&lt;br /&gt;
*[[Terminal Speed]]&lt;br /&gt;
*[[Simple Harmonic Motion]]&lt;br /&gt;
*[[Speed and Velocity]]&lt;br /&gt;
*[[Electric Polarization]]&lt;br /&gt;
*[[Perpetual Freefall (Orbit)]]&lt;br /&gt;
*[[2-Dimensional Motion]]&lt;br /&gt;
*[[Center of Mass]]&lt;br /&gt;
*[[Reaction Time]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modeling with VPython===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[VPython]]&lt;br /&gt;
*[[VPython basics]]&lt;br /&gt;
*[[VPython Common Errors and Troubleshooting]]&lt;br /&gt;
*[[VPython Multithreading]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Einstein&#039;s Theory of Special Relativity]]&lt;br /&gt;
*[[Einstein&#039;s Theory of General Relativity]]&lt;br /&gt;
*[[Quantum Theory]]&lt;br /&gt;
*[[Maxwell&#039;s Electromagnetic Theory]]&lt;br /&gt;
*[[Atomic Theory]]&lt;br /&gt;
*[[String Theory]]&lt;br /&gt;
*[[Elementary Particles and Particle Physics Theory]]&lt;br /&gt;
*[[Law of Gravitation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notable Scientists===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Christian Doppler]]&lt;br /&gt;
*[[Albert Einstein]]&lt;br /&gt;
*[[Ernest Rutherford]]&lt;br /&gt;
*[[Joseph Henry]]&lt;br /&gt;
*[[Michael Faraday]]&lt;br /&gt;
*[[J.J. Thomson]]&lt;br /&gt;
*[[James Maxwell]]&lt;br /&gt;
*[[Robert Hooke]]&lt;br /&gt;
*[[Carl Friedrich Gauss]]&lt;br /&gt;
*[[Nikola Tesla]]&lt;br /&gt;
*[[Andre Marie Ampere]]&lt;br /&gt;
*[[Sir Isaac Newton]]&lt;br /&gt;
*[[J. Robert Oppenheimer]]&lt;br /&gt;
*[[Oliver Heaviside]]&lt;br /&gt;
*[[Rosalind Franklin]]&lt;br /&gt;
*[[Erwin Schrödinger]]&lt;br /&gt;
*[[Enrico Fermi]]&lt;br /&gt;
*[[Robert J. Van de Graaff]]&lt;br /&gt;
*[[Charles de Coulomb]]&lt;br /&gt;
*[[Hans Christian Ørsted]]&lt;br /&gt;
*[[Philo Farnsworth]]&lt;br /&gt;
*[[Niels Bohr]]&lt;br /&gt;
*[[Georg Ohm]]&lt;br /&gt;
*[[Galileo Galilei]]&lt;br /&gt;
*[[Gustav Kirchhoff]]&lt;br /&gt;
*[[Max Planck]]&lt;br /&gt;
*[[Heinrich Hertz]]&lt;br /&gt;
*[[Edwin Hall]]&lt;br /&gt;
*[[James Watt]]&lt;br /&gt;
*[[Count Alessandro Volta]]&lt;br /&gt;
*[[Josiah Willard Gibbs]]&lt;br /&gt;
*[[Richard Phillips Feynman]]&lt;br /&gt;
*[[Sir David Brewster]]&lt;br /&gt;
*[[Daniel Bernoulli]]&lt;br /&gt;
*[[William Thomson]]&lt;br /&gt;
*[[Leonhard Euler]]&lt;br /&gt;
*[[Robert Fox Bacher]]&lt;br /&gt;
*[[Stephen Hawking]]&lt;br /&gt;
*[[Amedeo Avogadro]]&lt;br /&gt;
*[[Wilhelm Conrad Roentgen]]&lt;br /&gt;
*[[Pierre Laplace]]&lt;br /&gt;
*[[Thomas Edison]]&lt;br /&gt;
*[[Hendrik Lorentz]]&lt;br /&gt;
*[[Jean-Baptiste Biot]]&lt;br /&gt;
*[[Lise Meitner]]&lt;br /&gt;
*[[Lisa Randall]]&lt;br /&gt;
*[[Felix Savart]]&lt;br /&gt;
*[[Heinrich Lenz]]&lt;br /&gt;
*[[Max Born]]&lt;br /&gt;
*[[Archimedes]]&lt;br /&gt;
*[[Jean Baptiste Biot]]&lt;br /&gt;
*[[Carl Sagan]]&lt;br /&gt;
*[[Eugene Wigner]]&lt;br /&gt;
*[[Marie Curie]]&lt;br /&gt;
*[[Pierre Curie]]&lt;br /&gt;
*[[Werner Heisenberg]]&lt;br /&gt;
*[[Johannes Diderik van der Waals]]&lt;br /&gt;
*[[Louis de Broglie]]&lt;br /&gt;
*[[Aristotle]]&lt;br /&gt;
*[[Émilie du Châtelet]]&lt;br /&gt;
*[[Blaise Pascal]]&lt;br /&gt;
*[[Benjamin Franklin]]&lt;br /&gt;
*[[James Chadwick]]&lt;br /&gt;
*[[Henry Cavendish]]&lt;br /&gt;
*[[Thomas Young]]&lt;br /&gt;
*[[James Prescott Joule]]&lt;br /&gt;
*[[John Bardeen]]&lt;br /&gt;
*[[Leo Baekeland]]&lt;br /&gt;
*[[Alhazen]]&lt;br /&gt;
*[[Willebrod Snell]]&lt;br /&gt;
*[[Fritz Walther Meissner]]&lt;br /&gt;
*[[Johannes Kepler]]&lt;br /&gt;
*[[Johann Wilhelm Ritter]]&lt;br /&gt;
*[[Philipp Lenard]]&lt;br /&gt;
*[[Xuesen Qian]]&lt;br /&gt;
*[[Robert A. Millikan]]&lt;br /&gt;
*[[Joseph Louis Gay-Lussac]]&lt;br /&gt;
*[[Guglielmo Marconi]]&lt;br /&gt;
*[[Luis Walter Alvarez]]&lt;br /&gt;
*[[Robert Goddard]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Properties of Matter===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Mass]]&lt;br /&gt;
*[[Velocity]]&lt;br /&gt;
*[[Relative Velocity]]&lt;br /&gt;
*[[Density]]&lt;br /&gt;
*[[Charge]]&lt;br /&gt;
*[[Spin]]&lt;br /&gt;
*[[SI Units]]&lt;br /&gt;
*[[Heat Capacity]]&lt;br /&gt;
*[[Specific Heat]]&lt;br /&gt;
*[[Wavelength]]&lt;br /&gt;
*[[Conductivity]]&lt;br /&gt;
*[[Malleability]]&lt;br /&gt;
*[[Weight]]&lt;br /&gt;
*[[Boiling Point]]&lt;br /&gt;
*[[Melting Point]]&lt;br /&gt;
*[[Inertia]]&lt;br /&gt;
*[[Non-Newtonian Fluids]]&lt;br /&gt;
*[[Color]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Contact Interactions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Young&#039;s Modulus]]&lt;br /&gt;
* [[Friction]]&lt;br /&gt;
* [[Tension]]&lt;br /&gt;
* [[Hooke&#039;s Law]]&lt;br /&gt;
*[[Centripetal Force and Curving Motion]]&lt;br /&gt;
*[[Compression or Normal Force]]&lt;br /&gt;
* [[Length and Stiffness of an Interatomic Bond]]&lt;br /&gt;
* [[Speed of Sound in a Solid]]&lt;br /&gt;
* [[Iterative Prediction of Spring-Mass System]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Momentum===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Vectors]]&lt;br /&gt;
* [[Kinematics]]&lt;br /&gt;
* [[Conservation of Momentum]]&lt;br /&gt;
* [[Predicting Change in multiple dimensions]]&lt;br /&gt;
* [[Derivation of the Momentum Principle]]&lt;br /&gt;
* [[Momentum Principle]]&lt;br /&gt;
* [[Impulse Momentum]]&lt;br /&gt;
* [[Curving Motion]]&lt;br /&gt;
* [[Projectile Motion]]&lt;br /&gt;
* [[Multi-particle Analysis of Momentum]]&lt;br /&gt;
* [[Iterative Prediction]]&lt;br /&gt;
* [[Analytical Prediction]]&lt;br /&gt;
* [[Newton&#039;s Laws and Linear Momentum]]&lt;br /&gt;
* [[Net Force]]&lt;br /&gt;
* [[Center of Mass]]&lt;br /&gt;
* [[Momentum at High Speeds]]&lt;br /&gt;
* [[Change in Momentum in Time for Curving Motion]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Angular Momentum===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[The Moments of Inertia]]&lt;br /&gt;
* [[Moment of Inertia for a ring]]&lt;br /&gt;
* [[Rotation]]&lt;br /&gt;
* [[Torque]]&lt;br /&gt;
* [[Systems with Zero Torque]]&lt;br /&gt;
* [[Systems with Nonzero Torque]]&lt;br /&gt;
* [[Right Hand Rule]]&lt;br /&gt;
* [[Angular Velocity]]&lt;br /&gt;
* [[Predicting the Position of a Rotating System]]&lt;br /&gt;
* [[Translational Angular Momentum]]&lt;br /&gt;
* [[The Angular Momentum Principle]]&lt;br /&gt;
* [[Angular Momentum of Multiparticle Systems]]&lt;br /&gt;
* [[Rotational Angular Momentum]]&lt;br /&gt;
* [[Total Angular Momentum]]&lt;br /&gt;
* [[Gyroscopes]]&lt;br /&gt;
* [[Angular Momentum Compared to Linear Momentum]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Energy===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[The Photoelectric Effect]]&lt;br /&gt;
*[[Photons]]&lt;br /&gt;
*[[The Energy Principle]]&lt;br /&gt;
*[[Predicting Change]]&lt;br /&gt;
*[[Rest Mass Energy]]&lt;br /&gt;
*[[Kinetic Energy]]&lt;br /&gt;
*[[Potential Energy]]&lt;br /&gt;
**[[Potential Energy for a Magnetic Dipole]]&lt;br /&gt;
**[[Potential Energy of a Multiparticle System]]&lt;br /&gt;
*[[Work]]&lt;br /&gt;
*[[Work and Energy for an Extended System]]&lt;br /&gt;
*[[Thermal Energy]]&lt;br /&gt;
*[[Conservation of Energy]]&lt;br /&gt;
*[[Electric Potential]]&lt;br /&gt;
*[[Energy Transfer due to a Temperature Difference]]&lt;br /&gt;
*[[Gravitational Potential Energy]]&lt;br /&gt;
*[[Point Particle Systems]]&lt;br /&gt;
*[[Real Systems]]&lt;br /&gt;
*[[Spring Potential Energy]]&lt;br /&gt;
**[[Ball and Spring Model]]&lt;br /&gt;
*[[Internal Energy]]&lt;br /&gt;
**[[Potential Energy of a Pair of Neutral Atoms]]&lt;br /&gt;
*[[Translational, Rotational and Vibrational Energy]]&lt;br /&gt;
*[[Franck-Hertz Experiment]]&lt;br /&gt;
*[[Power (Mechanical)]]&lt;br /&gt;
*[[Transformation of Energy]]&lt;br /&gt;
&lt;br /&gt;
*[[Energy Graphs]]&lt;br /&gt;
**[[Energy graphs and the Bohr model]]&lt;br /&gt;
*[[Air Resistance]]&lt;br /&gt;
*[[Electronic Energy Levels]]&lt;br /&gt;
*[[Second Law of Thermodynamics and Entropy]]&lt;br /&gt;
*[[Specific Heat Capacity]]&lt;br /&gt;
*[[Electronic Energy Levels and Photons]]&lt;br /&gt;
*[[Energy Density]]&lt;br /&gt;
*[[Bohr Model]]&lt;br /&gt;
*[[Quantized energy levels]]&lt;br /&gt;
**[[Spontaneous Photon Emission]]&lt;br /&gt;
*[[Path Independence of Electric Potential]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Collisions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Collisions]]&lt;br /&gt;
*[[Maximally Inelastic Collision]]&lt;br /&gt;
*[[Elastic Collisions]]&lt;br /&gt;
*[[Inelastic Collisions]]&lt;br /&gt;
*[[Head-on Collision of Equal Masses]]&lt;br /&gt;
*[[Head-on Collision of Unequal Masses]]&lt;br /&gt;
*[[Frame of Reference]]&lt;br /&gt;
*[[Rutherford Experiment and Atomic Collisions]]&lt;br /&gt;
*[[Coefficient of Restitution]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fields===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Electric Field]] of a&lt;br /&gt;
** [[Point Charge]]&lt;br /&gt;
** [[Electric Dipole]]&lt;br /&gt;
** [[Capacitor]]&lt;br /&gt;
** [[Charged Rod]]&lt;br /&gt;
** [[Charged Ring]]&lt;br /&gt;
** [[Charged Disk]]&lt;br /&gt;
** [[Charged Spherical Shell]]&lt;br /&gt;
** [[Charged Cylinder]]&lt;br /&gt;
** [[Charge Density]]&lt;br /&gt;
**[[A Solid Sphere Charged Throughout Its Volume]]&lt;br /&gt;
*[[Electric Potential]] &lt;br /&gt;
**[[Potential Difference Path Independence]]&lt;br /&gt;
**[[Potential Difference in a Uniform Field]]&lt;br /&gt;
**[[Potential Difference of point charge in a non-Uniform Field]]&lt;br /&gt;
**[[Sign of Potential Difference]]&lt;br /&gt;
**[[Potential Difference in an Insulator]]&lt;br /&gt;
**[[Energy Density and Electric Field]]&lt;br /&gt;
** [[Systems of Charged Objects]]&lt;br /&gt;
*[[Electric Force]]&lt;br /&gt;
*[[Polarization]]&lt;br /&gt;
**[[Polarization of an Atom]]&lt;br /&gt;
*[[Charge Motion in Metals]]&lt;br /&gt;
*[[Charge Transfer]]&lt;br /&gt;
*[[Magnetic Field]]&lt;br /&gt;
**[[Right-Hand Rule]]&lt;br /&gt;
**[[Direction of Magnetic Field]]&lt;br /&gt;
**[[Magnetic Field of a Long Straight Wire]]&lt;br /&gt;
**[[Magnetic Field of a Loop]]&lt;br /&gt;
**[[Magnetic Field of a Solenoid]]&lt;br /&gt;
**[[Bar Magnet]]&lt;br /&gt;
**[[Magnetic Dipole Moment]]&lt;br /&gt;
***[[Stern-Gerlach Experiment]]&lt;br /&gt;
**[[Magnetic Force]]&lt;br /&gt;
**[[Earth&#039;s Magnetic Field]]&lt;br /&gt;
**[[Atomic Structure of Magnets]]&lt;br /&gt;
*[[Combining Electric and Magnetic Forces]]&lt;br /&gt;
**[[Magnetic Torque]]&lt;br /&gt;
**[[Hall Effect]]&lt;br /&gt;
**[[Lorentz Force]]&lt;br /&gt;
**[[Biot-Savart Law]]&lt;br /&gt;
**[[Biot-Savart Law for Currents]]&lt;br /&gt;
**[[Integration Techniques for Magnetic Field]]&lt;br /&gt;
**[[Sparks in Air]]&lt;br /&gt;
**[[Motional Emf]]&lt;br /&gt;
**[[Detecting a Magnetic Field]]&lt;br /&gt;
**[[Moving Point Charge]]&lt;br /&gt;
**[[Non-Coulomb Electric Field]]&lt;br /&gt;
**[[Motors and Generators]]&lt;br /&gt;
**[[Solenoid Applications]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Simple Circuits===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Components]]&lt;br /&gt;
*[[Steady State]]&lt;br /&gt;
*[[Non Steady State]]&lt;br /&gt;
*[[Charging and Discharging a Capacitor]]&lt;br /&gt;
*[[Thin and Thick Wires]]&lt;br /&gt;
*[[Node Rule]]&lt;br /&gt;
*[[Loop Rule]]&lt;br /&gt;
*[[Resistivity]]&lt;br /&gt;
*[[Power in a circuit]]&lt;br /&gt;
*[[Ammeters,Voltmeters,Ohmmeters]]&lt;br /&gt;
*[[Current]]&lt;br /&gt;
**[[AC]]&lt;br /&gt;
*[[Ohm&#039;s Law]]&lt;br /&gt;
*[[Series Circuits]]&lt;br /&gt;
*[[Parallel Circuits]]&lt;br /&gt;
*[[RC]]&lt;br /&gt;
*[[AC vs DC]]&lt;br /&gt;
*[[Charge in a RC Circuit]]&lt;br /&gt;
*[[Current in a RC circuit]]&lt;br /&gt;
*[[Circular Loop of Wire]]&lt;br /&gt;
*[[Current in a RL Circuit]]&lt;br /&gt;
*[[RL Circuit]]&lt;br /&gt;
*[[LC Circuit]]&lt;br /&gt;
*[[Surface Charge Distributions]]&lt;br /&gt;
*[[Feedback]]&lt;br /&gt;
*[[Transformers (Circuits)]]&lt;br /&gt;
*[[Resistors and Conductivity]]&lt;br /&gt;
*[[Semiconductor Devices]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Maxwell&#039;s Equations===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Gauss&#039;s Flux Theorem]]&lt;br /&gt;
**[[Electric Fields]]&lt;br /&gt;
**[[Magnetic Fields]]&lt;br /&gt;
*[[Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of Coaxial Cable Using Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of a Long Thick Wire Using Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of a Toroid Using Ampere&#039;s Law]]&lt;br /&gt;
*[[Faraday&#039;s Law]]&lt;br /&gt;
**[[Curly Electric Fields]]&lt;br /&gt;
**[[Inductance]]&lt;br /&gt;
***[[Transformers (Physics)]]&lt;br /&gt;
***[[Energy Density]]&lt;br /&gt;
**[[Lenz&#039;s Law]]&lt;br /&gt;
***[[Lenz Effect and the Jumping Ring]]&lt;br /&gt;
**[[Motional Emf using Faraday&#039;s Law]]&lt;br /&gt;
*[[Ampere-Maxwell Law]]&lt;br /&gt;
*[[Superconductors]]&lt;br /&gt;
**[[Meissner effect]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Radiation===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Producing a Radiative Electric Field]]&lt;br /&gt;
*[[Sinusoidal Electromagnetic Radiaton]]&lt;br /&gt;
*[[Lenses]]&lt;br /&gt;
*[[Energy and Momentum Analysis in Radiation]]&lt;br /&gt;
**[[Poynting Vector]]&lt;br /&gt;
*[[Electromagnetic Propagation]]&lt;br /&gt;
**[[Wavelength and Frequency]]&lt;br /&gt;
*[[Snell&#039;s Law]]&lt;br /&gt;
*[[Effects of Radiation on Matter]]&lt;br /&gt;
*[[Light Propagation Through a Medium]]&lt;br /&gt;
*[[Light Scaterring: Why is the Sky Blue]]&lt;br /&gt;
*[[Light Refraction: Bending of light]]&lt;br /&gt;
*[[Cherenkov Radiation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Doppler Effect]]&lt;br /&gt;
*[[Nature, Behavior, and Properties of Sound]]&lt;br /&gt;
*[[Resonance]]&lt;br /&gt;
*[[Sound Barrier]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Waves===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Multisource Interference: Diffraction]]&lt;br /&gt;
*[[Standing waves]]&lt;br /&gt;
*[[Gravitational waves]]&lt;br /&gt;
*[[Plasma waves]]&lt;br /&gt;
*[[Wave-Particle Duality]]&lt;br /&gt;
*[[Electromagnetic Waves]]&lt;br /&gt;
*[[Electromagnetic Spectrum]]&lt;br /&gt;
*[[Color Light Wave]]&lt;br /&gt;
*[[Mechanical Waves]]&lt;br /&gt;
*[[Pendulum Motion]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Real Life Applications of Electromagnetic Principles===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Electromagnetic Junkyard Cranes]]&lt;br /&gt;
*[[Maglev Trains]]&lt;br /&gt;
*[[Spark Plugs]]&lt;br /&gt;
*[[Metal Detectors]]&lt;br /&gt;
*[[Speakers]]&lt;br /&gt;
*[[Radios]]&lt;br /&gt;
*[[Ampullae of Lorenzini]]&lt;br /&gt;
*[[Generator]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Optics===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Mirrors]]&lt;br /&gt;
*[[Refraction]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* Commonly used wiki commands [https://en.wikipedia.org/wiki/Help:Cheatsheet Wiki Cheatsheet]&lt;br /&gt;
* A guide to representing equations in math mode [https://en.wikipedia.org/wiki/Help:Displaying_a_formula Wiki Math Mode]&lt;br /&gt;
* A page to keep track of all the physics [[Constants]]&lt;br /&gt;
* A page for review of [[Vectors]] and vector operations&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Troubleshooting&amp;diff=11958</id>
		<title>VPython Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Troubleshooting&amp;diff=11958"/>
		<updated>2015-12-04T15:32:06Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: Lucasec moved page VPython Troubleshooting to VPython Common Errors and Troubleshooting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[VPython Common Errors and Troubleshooting]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11957</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11957"/>
		<updated>2015-12-04T15:32:06Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: Lucasec moved page VPython Troubleshooting to VPython Common Errors and Troubleshooting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Main_Page&amp;diff=11954</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Main_Page&amp;diff=11954"/>
		<updated>2015-12-04T15:30:54Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Organizing Categories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Welcome to the Georgia Tech Wiki for Intro Physics.  This resources was created so that students can contribute and curate content to help those with limited or no access to a textbook.  When reading this website, please correct any errors you may come across. If you read something that isn&#039;t clear, please consider revising it!&lt;br /&gt;
&lt;br /&gt;
Looking to make a contribution?&lt;br /&gt;
#Pick a specific topic from intro physics&lt;br /&gt;
#Add that topic, as a link to a new page, under the appropriate category listed below by editing this page.&lt;br /&gt;
#Copy and paste the default [[Template]] into your new page and start editing.&lt;br /&gt;
&lt;br /&gt;
Please remember that this is not a textbook and you are not limited to expressing your ideas with only text and equations.  Whenever possible embed: pictures, videos, diagrams, simulations, computational models (e.g. Glowscript), and whatever content you think makes learning physics easier for other students.&lt;br /&gt;
&lt;br /&gt;
== Source Material ==&lt;br /&gt;
All of the content added to this resource must be in the public domain or similar free resource.  If you are unsure about a source, contact the original author for permission. That said, there is a surprisingly large amount of introductory physics content scattered across the web.  Here is an incomplete list of intro physics resources (please update as needed).&lt;br /&gt;
* A physics resource written by experts for an expert audience [https://en.wikipedia.org/wiki/Portal:Physics Physics Portal]&lt;br /&gt;
* A wiki book on modern physics [https://en.wikibooks.org/wiki/Modern_Physics Modern Physics Wiki]&lt;br /&gt;
* The MIT open courseware for intro physics [http://ocw.mit.edu/resources/res-8-002-a-wikitextbook-for-introductory-mechanics-fall-2009/index.htm MITOCW Wiki]&lt;br /&gt;
* An online concept map of intro physics [http://hyperphysics.phy-astr.gsu.edu/hbase/hph.html HyperPhysics]&lt;br /&gt;
* Interactive physics simulations [https://phet.colorado.edu/en/simulations/category/physics PhET]&lt;br /&gt;
* OpenStax algebra based intro physics textbook [https://openstaxcollege.org/textbooks/college-physics College Physics]&lt;br /&gt;
* The Open Source Physics project is a collection of online physics resources [http://www.opensourcephysics.org/ OSP]&lt;br /&gt;
* A resource guide compiled by the [http://www.aapt.org/ AAPT] for educators [http://www.compadre.org/ ComPADRE]&lt;br /&gt;
&lt;br /&gt;
== Organizing Categories ==&lt;br /&gt;
These are the broad, overarching categories, that we cover in two semester of introductory physics.  You can add subcategories or make a new category as needed.  A single topic should direct readers to a page in one of these catagories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
===Interactions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Kinds of Matter]]&lt;br /&gt;
**[[Ball and Spring Model of Matter]]&lt;br /&gt;
*[[Detecting Interactions]]&lt;br /&gt;
*[[Fundamental Interactions]]&lt;br /&gt;
*[[Determinism]]&lt;br /&gt;
*[[System &amp;amp; Surroundings]] &lt;br /&gt;
*[[Newton&#039;s First Law of Motion]]&lt;br /&gt;
*[[Newton&#039;s Second Law of Motion]]&lt;br /&gt;
*[[Newton&#039;s Third Law of Motion]]&lt;br /&gt;
*[[Gravitational Force]]&lt;br /&gt;
*[[Electric Force]]&lt;br /&gt;
*[[Conservation of Energy]]&lt;br /&gt;
*[[Conservation of Charge]]&lt;br /&gt;
*[[Terminal Speed]]&lt;br /&gt;
*[[Simple Harmonic Motion]]&lt;br /&gt;
*[[Speed and Velocity]]&lt;br /&gt;
*[[Electric Polarization]]&lt;br /&gt;
*[[Perpetual Freefall (Orbit)]]&lt;br /&gt;
*[[2-Dimensional Motion]]&lt;br /&gt;
*[[Center of Mass]]&lt;br /&gt;
*[[Reaction Time]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modeling with VPython===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[VPython]]&lt;br /&gt;
*[[VPython basics]]&lt;br /&gt;
*[[VPython Troubleshooting]]&lt;br /&gt;
*[[VPython Multithreading]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Einstein&#039;s Theory of Special Relativity]]&lt;br /&gt;
*[[Einstein&#039;s Theory of General Relativity]]&lt;br /&gt;
*[[Quantum Theory]]&lt;br /&gt;
*[[Maxwell&#039;s Electromagnetic Theory]]&lt;br /&gt;
*[[Atomic Theory]]&lt;br /&gt;
*[[String Theory]]&lt;br /&gt;
*[[Elementary Particles and Particle Physics Theory]]&lt;br /&gt;
*[[Law of Gravitation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notable Scientists===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Christian Doppler]]&lt;br /&gt;
*[[Albert Einstein]]&lt;br /&gt;
*[[Ernest Rutherford]]&lt;br /&gt;
*[[Joseph Henry]]&lt;br /&gt;
*[[Michael Faraday]]&lt;br /&gt;
*[[J.J. Thomson]]&lt;br /&gt;
*[[James Maxwell]]&lt;br /&gt;
*[[Robert Hooke]]&lt;br /&gt;
*[[Carl Friedrich Gauss]]&lt;br /&gt;
*[[Nikola Tesla]]&lt;br /&gt;
*[[Andre Marie Ampere]]&lt;br /&gt;
*[[Sir Isaac Newton]]&lt;br /&gt;
*[[J. Robert Oppenheimer]]&lt;br /&gt;
*[[Oliver Heaviside]]&lt;br /&gt;
*[[Rosalind Franklin]]&lt;br /&gt;
*[[Erwin Schrödinger]]&lt;br /&gt;
*[[Enrico Fermi]]&lt;br /&gt;
*[[Robert J. Van de Graaff]]&lt;br /&gt;
*[[Charles de Coulomb]]&lt;br /&gt;
*[[Hans Christian Ørsted]]&lt;br /&gt;
*[[Philo Farnsworth]]&lt;br /&gt;
*[[Niels Bohr]]&lt;br /&gt;
*[[Georg Ohm]]&lt;br /&gt;
*[[Galileo Galilei]]&lt;br /&gt;
*[[Gustav Kirchhoff]]&lt;br /&gt;
*[[Max Planck]]&lt;br /&gt;
*[[Heinrich Hertz]]&lt;br /&gt;
*[[Edwin Hall]]&lt;br /&gt;
*[[James Watt]]&lt;br /&gt;
*[[Count Alessandro Volta]]&lt;br /&gt;
*[[Josiah Willard Gibbs]]&lt;br /&gt;
*[[Richard Phillips Feynman]]&lt;br /&gt;
*[[Sir David Brewster]]&lt;br /&gt;
*[[Daniel Bernoulli]]&lt;br /&gt;
*[[William Thomson]]&lt;br /&gt;
*[[Leonhard Euler]]&lt;br /&gt;
*[[Robert Fox Bacher]]&lt;br /&gt;
*[[Stephen Hawking]]&lt;br /&gt;
*[[Amedeo Avogadro]]&lt;br /&gt;
*[[Wilhelm Conrad Roentgen]]&lt;br /&gt;
*[[Pierre Laplace]]&lt;br /&gt;
*[[Thomas Edison]]&lt;br /&gt;
*[[Hendrik Lorentz]]&lt;br /&gt;
*[[Jean-Baptiste Biot]]&lt;br /&gt;
*[[Lise Meitner]]&lt;br /&gt;
*[[Lisa Randall]]&lt;br /&gt;
*[[Felix Savart]]&lt;br /&gt;
*[[Heinrich Lenz]]&lt;br /&gt;
*[[Max Born]]&lt;br /&gt;
*[[Archimedes]]&lt;br /&gt;
*[[Jean Baptiste Biot]]&lt;br /&gt;
*[[Carl Sagan]]&lt;br /&gt;
*[[Eugene Wigner]]&lt;br /&gt;
*[[Marie Curie]]&lt;br /&gt;
*[[Pierre Curie]]&lt;br /&gt;
*[[Werner Heisenberg]]&lt;br /&gt;
*[[Johannes Diderik van der Waals]]&lt;br /&gt;
*[[Louis de Broglie]]&lt;br /&gt;
*[[Aristotle]]&lt;br /&gt;
*[[Émilie du Châtelet]]&lt;br /&gt;
*[[Blaise Pascal]]&lt;br /&gt;
*[[Benjamin Franklin]]&lt;br /&gt;
*[[James Chadwick]]&lt;br /&gt;
*[[Henry Cavendish]]&lt;br /&gt;
*[[Thomas Young]]&lt;br /&gt;
*[[James Prescott Joule]]&lt;br /&gt;
*[[John Bardeen]]&lt;br /&gt;
*[[Leo Baekeland]]&lt;br /&gt;
*[[Alhazen]]&lt;br /&gt;
*[[Willebrod Snell]]&lt;br /&gt;
*[[Fritz Walther Meissner]]&lt;br /&gt;
*[[Johannes Kepler]]&lt;br /&gt;
*[[Johann Wilhelm Ritter]]&lt;br /&gt;
*[[Philipp Lenard]]&lt;br /&gt;
*[[Xuesen Qian]]&lt;br /&gt;
*[[Robert A. Millikan]]&lt;br /&gt;
*[[Joseph Louis Gay-Lussac]]&lt;br /&gt;
*[[Guglielmo Marconi]]&lt;br /&gt;
*[[Luis Walter Alvarez]]&lt;br /&gt;
*[[Robert Goddard]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Properties of Matter===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Mass]]&lt;br /&gt;
*[[Velocity]]&lt;br /&gt;
*[[Relative Velocity]]&lt;br /&gt;
*[[Density]]&lt;br /&gt;
*[[Charge]]&lt;br /&gt;
*[[Spin]]&lt;br /&gt;
*[[SI Units]]&lt;br /&gt;
*[[Heat Capacity]]&lt;br /&gt;
*[[Specific Heat]]&lt;br /&gt;
*[[Wavelength]]&lt;br /&gt;
*[[Conductivity]]&lt;br /&gt;
*[[Malleability]]&lt;br /&gt;
*[[Weight]]&lt;br /&gt;
*[[Boiling Point]]&lt;br /&gt;
*[[Melting Point]]&lt;br /&gt;
*[[Inertia]]&lt;br /&gt;
*[[Non-Newtonian Fluids]]&lt;br /&gt;
*[[Color]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Contact Interactions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Young&#039;s Modulus]]&lt;br /&gt;
* [[Friction]]&lt;br /&gt;
* [[Tension]]&lt;br /&gt;
* [[Hooke&#039;s Law]]&lt;br /&gt;
*[[Centripetal Force and Curving Motion]]&lt;br /&gt;
*[[Compression or Normal Force]]&lt;br /&gt;
* [[Length and Stiffness of an Interatomic Bond]]&lt;br /&gt;
* [[Speed of Sound in a Solid]]&lt;br /&gt;
* [[Iterative Prediction of Spring-Mass System]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Momentum===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Vectors]]&lt;br /&gt;
* [[Kinematics]]&lt;br /&gt;
* [[Conservation of Momentum]]&lt;br /&gt;
* [[Predicting Change in multiple dimensions]]&lt;br /&gt;
* [[Derivation of the Momentum Principle]]&lt;br /&gt;
* [[Momentum Principle]]&lt;br /&gt;
* [[Impulse Momentum]]&lt;br /&gt;
* [[Curving Motion]]&lt;br /&gt;
* [[Projectile Motion]]&lt;br /&gt;
* [[Multi-particle Analysis of Momentum]]&lt;br /&gt;
* [[Iterative Prediction]]&lt;br /&gt;
* [[Analytical Prediction]]&lt;br /&gt;
* [[Newton&#039;s Laws and Linear Momentum]]&lt;br /&gt;
* [[Net Force]]&lt;br /&gt;
* [[Center of Mass]]&lt;br /&gt;
* [[Momentum at High Speeds]]&lt;br /&gt;
* [[Change in Momentum in Time for Curving Motion]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Angular Momentum===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[The Moments of Inertia]]&lt;br /&gt;
* [[Moment of Inertia for a ring]]&lt;br /&gt;
* [[Rotation]]&lt;br /&gt;
* [[Torque]]&lt;br /&gt;
* [[Systems with Zero Torque]]&lt;br /&gt;
* [[Systems with Nonzero Torque]]&lt;br /&gt;
* [[Right Hand Rule]]&lt;br /&gt;
* [[Angular Velocity]]&lt;br /&gt;
* [[Predicting the Position of a Rotating System]]&lt;br /&gt;
* [[Translational Angular Momentum]]&lt;br /&gt;
* [[The Angular Momentum Principle]]&lt;br /&gt;
* [[Angular Momentum of Multiparticle Systems]]&lt;br /&gt;
* [[Rotational Angular Momentum]]&lt;br /&gt;
* [[Total Angular Momentum]]&lt;br /&gt;
* [[Gyroscopes]]&lt;br /&gt;
* [[Angular Momentum Compared to Linear Momentum]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Energy===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[The Photoelectric Effect]]&lt;br /&gt;
*[[Photons]]&lt;br /&gt;
*[[The Energy Principle]]&lt;br /&gt;
*[[Predicting Change]]&lt;br /&gt;
*[[Rest Mass Energy]]&lt;br /&gt;
*[[Kinetic Energy]]&lt;br /&gt;
*[[Potential Energy]]&lt;br /&gt;
**[[Potential Energy for a Magnetic Dipole]]&lt;br /&gt;
**[[Potential Energy of a Multiparticle System]]&lt;br /&gt;
*[[Work]]&lt;br /&gt;
*[[Work and Energy for an Extended System]]&lt;br /&gt;
*[[Thermal Energy]]&lt;br /&gt;
*[[Conservation of Energy]]&lt;br /&gt;
*[[Electric Potential]]&lt;br /&gt;
*[[Energy Transfer due to a Temperature Difference]]&lt;br /&gt;
*[[Gravitational Potential Energy]]&lt;br /&gt;
*[[Point Particle Systems]]&lt;br /&gt;
*[[Real Systems]]&lt;br /&gt;
*[[Spring Potential Energy]]&lt;br /&gt;
**[[Ball and Spring Model]]&lt;br /&gt;
*[[Internal Energy]]&lt;br /&gt;
**[[Potential Energy of a Pair of Neutral Atoms]]&lt;br /&gt;
*[[Translational, Rotational and Vibrational Energy]]&lt;br /&gt;
*[[Franck-Hertz Experiment]]&lt;br /&gt;
*[[Power (Mechanical)]]&lt;br /&gt;
*[[Transformation of Energy]]&lt;br /&gt;
&lt;br /&gt;
*[[Energy Graphs]]&lt;br /&gt;
**[[Energy graphs and the Bohr model]]&lt;br /&gt;
*[[Air Resistance]]&lt;br /&gt;
*[[Electronic Energy Levels]]&lt;br /&gt;
*[[Second Law of Thermodynamics and Entropy]]&lt;br /&gt;
*[[Specific Heat Capacity]]&lt;br /&gt;
*[[Electronic Energy Levels and Photons]]&lt;br /&gt;
*[[Energy Density]]&lt;br /&gt;
*[[Bohr Model]]&lt;br /&gt;
*[[Quantized energy levels]]&lt;br /&gt;
**[[Spontaneous Photon Emission]]&lt;br /&gt;
*[[Path Independence of Electric Potential]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Collisions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Collisions]]&lt;br /&gt;
*[[Maximally Inelastic Collision]]&lt;br /&gt;
*[[Elastic Collisions]]&lt;br /&gt;
*[[Inelastic Collisions]]&lt;br /&gt;
*[[Head-on Collision of Equal Masses]]&lt;br /&gt;
*[[Head-on Collision of Unequal Masses]]&lt;br /&gt;
*[[Frame of Reference]]&lt;br /&gt;
*[[Rutherford Experiment and Atomic Collisions]]&lt;br /&gt;
*[[Coefficient of Restitution]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fields===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Electric Field]] of a&lt;br /&gt;
** [[Point Charge]]&lt;br /&gt;
** [[Electric Dipole]]&lt;br /&gt;
** [[Capacitor]]&lt;br /&gt;
** [[Charged Rod]]&lt;br /&gt;
** [[Charged Ring]]&lt;br /&gt;
** [[Charged Disk]]&lt;br /&gt;
** [[Charged Spherical Shell]]&lt;br /&gt;
** [[Charged Cylinder]]&lt;br /&gt;
** [[Charge Density]]&lt;br /&gt;
**[[A Solid Sphere Charged Throughout Its Volume]]&lt;br /&gt;
*[[Electric Potential]] &lt;br /&gt;
**[[Potential Difference Path Independence]]&lt;br /&gt;
**[[Potential Difference in a Uniform Field]]&lt;br /&gt;
**[[Potential Difference of point charge in a non-Uniform Field]]&lt;br /&gt;
**[[Sign of Potential Difference]]&lt;br /&gt;
**[[Potential Difference in an Insulator]]&lt;br /&gt;
**[[Energy Density and Electric Field]]&lt;br /&gt;
** [[Systems of Charged Objects]]&lt;br /&gt;
*[[Electric Force]]&lt;br /&gt;
*[[Polarization]]&lt;br /&gt;
**[[Polarization of an Atom]]&lt;br /&gt;
*[[Charge Motion in Metals]]&lt;br /&gt;
*[[Charge Transfer]]&lt;br /&gt;
*[[Magnetic Field]]&lt;br /&gt;
**[[Right-Hand Rule]]&lt;br /&gt;
**[[Direction of Magnetic Field]]&lt;br /&gt;
**[[Magnetic Field of a Long Straight Wire]]&lt;br /&gt;
**[[Magnetic Field of a Loop]]&lt;br /&gt;
**[[Magnetic Field of a Solenoid]]&lt;br /&gt;
**[[Bar Magnet]]&lt;br /&gt;
**[[Magnetic Dipole Moment]]&lt;br /&gt;
***[[Stern-Gerlach Experiment]]&lt;br /&gt;
**[[Magnetic Force]]&lt;br /&gt;
**[[Earth&#039;s Magnetic Field]]&lt;br /&gt;
**[[Atomic Structure of Magnets]]&lt;br /&gt;
*[[Combining Electric and Magnetic Forces]]&lt;br /&gt;
**[[Magnetic Torque]]&lt;br /&gt;
**[[Hall Effect]]&lt;br /&gt;
**[[Lorentz Force]]&lt;br /&gt;
**[[Biot-Savart Law]]&lt;br /&gt;
**[[Biot-Savart Law for Currents]]&lt;br /&gt;
**[[Integration Techniques for Magnetic Field]]&lt;br /&gt;
**[[Sparks in Air]]&lt;br /&gt;
**[[Motional Emf]]&lt;br /&gt;
**[[Detecting a Magnetic Field]]&lt;br /&gt;
**[[Moving Point Charge]]&lt;br /&gt;
**[[Non-Coulomb Electric Field]]&lt;br /&gt;
**[[Motors and Generators]]&lt;br /&gt;
**[[Solenoid Applications]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Simple Circuits===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Components]]&lt;br /&gt;
*[[Steady State]]&lt;br /&gt;
*[[Non Steady State]]&lt;br /&gt;
*[[Charging and Discharging a Capacitor]]&lt;br /&gt;
*[[Thin and Thick Wires]]&lt;br /&gt;
*[[Node Rule]]&lt;br /&gt;
*[[Loop Rule]]&lt;br /&gt;
*[[Resistivity]]&lt;br /&gt;
*[[Power in a circuit]]&lt;br /&gt;
*[[Ammeters,Voltmeters,Ohmmeters]]&lt;br /&gt;
*[[Current]]&lt;br /&gt;
**[[AC]]&lt;br /&gt;
*[[Ohm&#039;s Law]]&lt;br /&gt;
*[[Series Circuits]]&lt;br /&gt;
*[[Parallel Circuits]]&lt;br /&gt;
*[[RC]]&lt;br /&gt;
*[[AC vs DC]]&lt;br /&gt;
*[[Charge in a RC Circuit]]&lt;br /&gt;
*[[Current in a RC circuit]]&lt;br /&gt;
*[[Circular Loop of Wire]]&lt;br /&gt;
*[[Current in a RL Circuit]]&lt;br /&gt;
*[[RL Circuit]]&lt;br /&gt;
*[[LC Circuit]]&lt;br /&gt;
*[[Surface Charge Distributions]]&lt;br /&gt;
*[[Feedback]]&lt;br /&gt;
*[[Transformers (Circuits)]]&lt;br /&gt;
*[[Resistors and Conductivity]]&lt;br /&gt;
*[[Semiconductor Devices]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Maxwell&#039;s Equations===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Gauss&#039;s Flux Theorem]]&lt;br /&gt;
**[[Electric Fields]]&lt;br /&gt;
**[[Magnetic Fields]]&lt;br /&gt;
*[[Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of Coaxial Cable Using Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of a Long Thick Wire Using Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of a Toroid Using Ampere&#039;s Law]]&lt;br /&gt;
*[[Faraday&#039;s Law]]&lt;br /&gt;
**[[Curly Electric Fields]]&lt;br /&gt;
**[[Inductance]]&lt;br /&gt;
***[[Transformers (Physics)]]&lt;br /&gt;
***[[Energy Density]]&lt;br /&gt;
**[[Lenz&#039;s Law]]&lt;br /&gt;
***[[Lenz Effect and the Jumping Ring]]&lt;br /&gt;
**[[Motional Emf using Faraday&#039;s Law]]&lt;br /&gt;
*[[Ampere-Maxwell Law]]&lt;br /&gt;
*[[Superconductors]]&lt;br /&gt;
**[[Meissner effect]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Radiation===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Producing a Radiative Electric Field]]&lt;br /&gt;
*[[Sinusoidal Electromagnetic Radiaton]]&lt;br /&gt;
*[[Lenses]]&lt;br /&gt;
*[[Energy and Momentum Analysis in Radiation]]&lt;br /&gt;
**[[Poynting Vector]]&lt;br /&gt;
*[[Electromagnetic Propagation]]&lt;br /&gt;
**[[Wavelength and Frequency]]&lt;br /&gt;
*[[Snell&#039;s Law]]&lt;br /&gt;
*[[Effects of Radiation on Matter]]&lt;br /&gt;
*[[Light Propagation Through a Medium]]&lt;br /&gt;
*[[Light Scaterring: Why is the Sky Blue]]&lt;br /&gt;
*[[Light Refraction: Bending of light]]&lt;br /&gt;
*[[Cherenkov Radiation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Doppler Effect]]&lt;br /&gt;
*[[Nature, Behavior, and Properties of Sound]]&lt;br /&gt;
*[[Resonance]]&lt;br /&gt;
*[[Sound Barrier]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Waves===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Multisource Interference: Diffraction]]&lt;br /&gt;
*[[Standing waves]]&lt;br /&gt;
*[[Gravitational waves]]&lt;br /&gt;
*[[Plasma waves]]&lt;br /&gt;
*[[Wave-Particle Duality]]&lt;br /&gt;
*[[Electromagnetic Waves]]&lt;br /&gt;
*[[Electromagnetic Spectrum]]&lt;br /&gt;
*[[Color Light Wave]]&lt;br /&gt;
*[[Mechanical Waves]]&lt;br /&gt;
*[[Pendulum Motion]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Real Life Applications of Electromagnetic Principles===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Electromagnetic Junkyard Cranes]]&lt;br /&gt;
*[[Maglev Trains]]&lt;br /&gt;
*[[Spark Plugs]]&lt;br /&gt;
*[[Metal Detectors]]&lt;br /&gt;
*[[Speakers]]&lt;br /&gt;
*[[Radios]]&lt;br /&gt;
*[[Ampullae of Lorenzini]]&lt;br /&gt;
*[[Generator]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Optics===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Mirrors]]&lt;br /&gt;
*[[Refraction]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* Commonly used wiki commands [https://en.wikipedia.org/wiki/Help:Cheatsheet Wiki Cheatsheet]&lt;br /&gt;
* A guide to representing equations in math mode [https://en.wikipedia.org/wiki/Help:Displaying_a_formula Wiki Math Mode]&lt;br /&gt;
* A page to keep track of all the physics [[Constants]]&lt;br /&gt;
* A page for review of [[Vectors]] and vector operations&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=Main_Page&amp;diff=11949</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=Main_Page&amp;diff=11949"/>
		<updated>2015-12-04T15:29:33Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Computing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Welcome to the Georgia Tech Wiki for Intro Physics.  This resources was created so that students can contribute and curate content to help those with limited or no access to a textbook.  When reading this website, please correct any errors you may come across. If you read something that isn&#039;t clear, please consider revising it!&lt;br /&gt;
&lt;br /&gt;
Looking to make a contribution?&lt;br /&gt;
#Pick a specific topic from intro physics&lt;br /&gt;
#Add that topic, as a link to a new page, under the appropriate category listed below by editing this page.&lt;br /&gt;
#Copy and paste the default [[Template]] into your new page and start editing.&lt;br /&gt;
&lt;br /&gt;
Please remember that this is not a textbook and you are not limited to expressing your ideas with only text and equations.  Whenever possible embed: pictures, videos, diagrams, simulations, computational models (e.g. Glowscript), and whatever content you think makes learning physics easier for other students.&lt;br /&gt;
&lt;br /&gt;
== Source Material ==&lt;br /&gt;
All of the content added to this resource must be in the public domain or similar free resource.  If you are unsure about a source, contact the original author for permission. That said, there is a surprisingly large amount of introductory physics content scattered across the web.  Here is an incomplete list of intro physics resources (please update as needed).&lt;br /&gt;
* A physics resource written by experts for an expert audience [https://en.wikipedia.org/wiki/Portal:Physics Physics Portal]&lt;br /&gt;
* A wiki book on modern physics [https://en.wikibooks.org/wiki/Modern_Physics Modern Physics Wiki]&lt;br /&gt;
* The MIT open courseware for intro physics [http://ocw.mit.edu/resources/res-8-002-a-wikitextbook-for-introductory-mechanics-fall-2009/index.htm MITOCW Wiki]&lt;br /&gt;
* An online concept map of intro physics [http://hyperphysics.phy-astr.gsu.edu/hbase/hph.html HyperPhysics]&lt;br /&gt;
* Interactive physics simulations [https://phet.colorado.edu/en/simulations/category/physics PhET]&lt;br /&gt;
* OpenStax algebra based intro physics textbook [https://openstaxcollege.org/textbooks/college-physics College Physics]&lt;br /&gt;
* The Open Source Physics project is a collection of online physics resources [http://www.opensourcephysics.org/ OSP]&lt;br /&gt;
* A resource guide compiled by the [http://www.aapt.org/ AAPT] for educators [http://www.compadre.org/ ComPADRE]&lt;br /&gt;
&lt;br /&gt;
== Organizing Categories ==&lt;br /&gt;
These are the broad, overarching categories, that we cover in two semester of introductory physics.  You can add subcategories or make a new category as needed.  A single topic should direct readers to a page in one of these catagories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
===Interactions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Kinds of Matter]]&lt;br /&gt;
**[[Ball and Spring Model of Matter]]&lt;br /&gt;
*[[Detecting Interactions]]&lt;br /&gt;
*[[Fundamental Interactions]]&lt;br /&gt;
*[[Determinism]]&lt;br /&gt;
*[[System &amp;amp; Surroundings]] &lt;br /&gt;
*[[Newton&#039;s First Law of Motion]]&lt;br /&gt;
*[[Newton&#039;s Second Law of Motion]]&lt;br /&gt;
*[[Newton&#039;s Third Law of Motion]]&lt;br /&gt;
*[[Gravitational Force]]&lt;br /&gt;
*[[Electric Force]]&lt;br /&gt;
*[[Conservation of Energy]]&lt;br /&gt;
*[[Conservation of Charge]]&lt;br /&gt;
*[[Terminal Speed]]&lt;br /&gt;
*[[Simple Harmonic Motion]]&lt;br /&gt;
*[[Speed and Velocity]]&lt;br /&gt;
*[[Electric Polarization]]&lt;br /&gt;
*[[Perpetual Freefall (Orbit)]]&lt;br /&gt;
*[[2-Dimensional Motion]]&lt;br /&gt;
*[[Center of Mass]]&lt;br /&gt;
*[[Reaction Time]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Theory===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Einstein&#039;s Theory of Special Relativity]]&lt;br /&gt;
*[[Einstein&#039;s Theory of General Relativity]]&lt;br /&gt;
*[[Quantum Theory]]&lt;br /&gt;
*[[Maxwell&#039;s Electromagnetic Theory]]&lt;br /&gt;
*[[Atomic Theory]]&lt;br /&gt;
*[[String Theory]]&lt;br /&gt;
*[[Elementary Particles and Particle Physics Theory]]&lt;br /&gt;
*[[Law of Gravitation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notable Scientists===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Christian Doppler]]&lt;br /&gt;
*[[Albert Einstein]]&lt;br /&gt;
*[[Ernest Rutherford]]&lt;br /&gt;
*[[Joseph Henry]]&lt;br /&gt;
*[[Michael Faraday]]&lt;br /&gt;
*[[J.J. Thomson]]&lt;br /&gt;
*[[James Maxwell]]&lt;br /&gt;
*[[Robert Hooke]]&lt;br /&gt;
*[[Carl Friedrich Gauss]]&lt;br /&gt;
*[[Nikola Tesla]]&lt;br /&gt;
*[[Andre Marie Ampere]]&lt;br /&gt;
*[[Sir Isaac Newton]]&lt;br /&gt;
*[[J. Robert Oppenheimer]]&lt;br /&gt;
*[[Oliver Heaviside]]&lt;br /&gt;
*[[Rosalind Franklin]]&lt;br /&gt;
*[[Erwin Schrödinger]]&lt;br /&gt;
*[[Enrico Fermi]]&lt;br /&gt;
*[[Robert J. Van de Graaff]]&lt;br /&gt;
*[[Charles de Coulomb]]&lt;br /&gt;
*[[Hans Christian Ørsted]]&lt;br /&gt;
*[[Philo Farnsworth]]&lt;br /&gt;
*[[Niels Bohr]]&lt;br /&gt;
*[[Georg Ohm]]&lt;br /&gt;
*[[Galileo Galilei]]&lt;br /&gt;
*[[Gustav Kirchhoff]]&lt;br /&gt;
*[[Max Planck]]&lt;br /&gt;
*[[Heinrich Hertz]]&lt;br /&gt;
*[[Edwin Hall]]&lt;br /&gt;
*[[James Watt]]&lt;br /&gt;
*[[Count Alessandro Volta]]&lt;br /&gt;
*[[Josiah Willard Gibbs]]&lt;br /&gt;
*[[Richard Phillips Feynman]]&lt;br /&gt;
*[[Sir David Brewster]]&lt;br /&gt;
*[[Daniel Bernoulli]]&lt;br /&gt;
*[[William Thomson]]&lt;br /&gt;
*[[Leonhard Euler]]&lt;br /&gt;
*[[Robert Fox Bacher]]&lt;br /&gt;
*[[Stephen Hawking]]&lt;br /&gt;
*[[Amedeo Avogadro]]&lt;br /&gt;
*[[Wilhelm Conrad Roentgen]]&lt;br /&gt;
*[[Pierre Laplace]]&lt;br /&gt;
*[[Thomas Edison]]&lt;br /&gt;
*[[Hendrik Lorentz]]&lt;br /&gt;
*[[Jean-Baptiste Biot]]&lt;br /&gt;
*[[Lise Meitner]]&lt;br /&gt;
*[[Lisa Randall]]&lt;br /&gt;
*[[Felix Savart]]&lt;br /&gt;
*[[Heinrich Lenz]]&lt;br /&gt;
*[[Max Born]]&lt;br /&gt;
*[[Archimedes]]&lt;br /&gt;
*[[Jean Baptiste Biot]]&lt;br /&gt;
*[[Carl Sagan]]&lt;br /&gt;
*[[Eugene Wigner]]&lt;br /&gt;
*[[Marie Curie]]&lt;br /&gt;
*[[Pierre Curie]]&lt;br /&gt;
*[[Werner Heisenberg]]&lt;br /&gt;
*[[Johannes Diderik van der Waals]]&lt;br /&gt;
*[[Louis de Broglie]]&lt;br /&gt;
*[[Aristotle]]&lt;br /&gt;
*[[Émilie du Châtelet]]&lt;br /&gt;
*[[Blaise Pascal]]&lt;br /&gt;
*[[Benjamin Franklin]]&lt;br /&gt;
*[[James Chadwick]]&lt;br /&gt;
*[[Henry Cavendish]]&lt;br /&gt;
*[[Thomas Young]]&lt;br /&gt;
*[[James Prescott Joule]]&lt;br /&gt;
*[[John Bardeen]]&lt;br /&gt;
*[[Leo Baekeland]]&lt;br /&gt;
*[[Alhazen]]&lt;br /&gt;
*[[Willebrod Snell]]&lt;br /&gt;
*[[Fritz Walther Meissner]]&lt;br /&gt;
*[[Johannes Kepler]]&lt;br /&gt;
*[[Johann Wilhelm Ritter]]&lt;br /&gt;
*[[Philipp Lenard]]&lt;br /&gt;
*[[Xuesen Qian]]&lt;br /&gt;
*[[Robert A. Millikan]]&lt;br /&gt;
*[[Joseph Louis Gay-Lussac]]&lt;br /&gt;
*[[Guglielmo Marconi]]&lt;br /&gt;
*[[Luis Walter Alvarez]]&lt;br /&gt;
*[[Robert Goddard]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Properties of Matter===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Mass]]&lt;br /&gt;
*[[Velocity]]&lt;br /&gt;
*[[Relative Velocity]]&lt;br /&gt;
*[[Density]]&lt;br /&gt;
*[[Charge]]&lt;br /&gt;
*[[Spin]]&lt;br /&gt;
*[[SI Units]]&lt;br /&gt;
*[[Heat Capacity]]&lt;br /&gt;
*[[Specific Heat]]&lt;br /&gt;
*[[Wavelength]]&lt;br /&gt;
*[[Conductivity]]&lt;br /&gt;
*[[Malleability]]&lt;br /&gt;
*[[Weight]]&lt;br /&gt;
*[[Boiling Point]]&lt;br /&gt;
*[[Melting Point]]&lt;br /&gt;
*[[Inertia]]&lt;br /&gt;
*[[Non-Newtonian Fluids]]&lt;br /&gt;
*[[Color]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Contact Interactions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Young&#039;s Modulus]]&lt;br /&gt;
* [[Friction]]&lt;br /&gt;
* [[Tension]]&lt;br /&gt;
* [[Hooke&#039;s Law]]&lt;br /&gt;
*[[Centripetal Force and Curving Motion]]&lt;br /&gt;
*[[Compression or Normal Force]]&lt;br /&gt;
* [[Length and Stiffness of an Interatomic Bond]]&lt;br /&gt;
* [[Speed of Sound in a Solid]]&lt;br /&gt;
* [[Iterative Prediction of Spring-Mass System]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Momentum===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Vectors]]&lt;br /&gt;
* [[Kinematics]]&lt;br /&gt;
* [[Conservation of Momentum]]&lt;br /&gt;
* [[Predicting Change in multiple dimensions]]&lt;br /&gt;
* [[Derivation of the Momentum Principle]]&lt;br /&gt;
* [[Momentum Principle]]&lt;br /&gt;
* [[Impulse Momentum]]&lt;br /&gt;
* [[Curving Motion]]&lt;br /&gt;
* [[Projectile Motion]]&lt;br /&gt;
* [[Multi-particle Analysis of Momentum]]&lt;br /&gt;
* [[Iterative Prediction]]&lt;br /&gt;
* [[Analytical Prediction]]&lt;br /&gt;
* [[Newton&#039;s Laws and Linear Momentum]]&lt;br /&gt;
* [[Net Force]]&lt;br /&gt;
* [[Center of Mass]]&lt;br /&gt;
* [[Momentum at High Speeds]]&lt;br /&gt;
* [[Change in Momentum in Time for Curving Motion]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Angular Momentum===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[The Moments of Inertia]]&lt;br /&gt;
* [[Moment of Inertia for a ring]]&lt;br /&gt;
* [[Rotation]]&lt;br /&gt;
* [[Torque]]&lt;br /&gt;
* [[Systems with Zero Torque]]&lt;br /&gt;
* [[Systems with Nonzero Torque]]&lt;br /&gt;
* [[Right Hand Rule]]&lt;br /&gt;
* [[Angular Velocity]]&lt;br /&gt;
* [[Predicting the Position of a Rotating System]]&lt;br /&gt;
* [[Translational Angular Momentum]]&lt;br /&gt;
* [[The Angular Momentum Principle]]&lt;br /&gt;
* [[Angular Momentum of Multiparticle Systems]]&lt;br /&gt;
* [[Rotational Angular Momentum]]&lt;br /&gt;
* [[Total Angular Momentum]]&lt;br /&gt;
* [[Gyroscopes]]&lt;br /&gt;
* [[Angular Momentum Compared to Linear Momentum]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Energy===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[The Photoelectric Effect]]&lt;br /&gt;
*[[Photons]]&lt;br /&gt;
*[[The Energy Principle]]&lt;br /&gt;
*[[Predicting Change]]&lt;br /&gt;
*[[Rest Mass Energy]]&lt;br /&gt;
*[[Kinetic Energy]]&lt;br /&gt;
*[[Potential Energy]]&lt;br /&gt;
**[[Potential Energy for a Magnetic Dipole]]&lt;br /&gt;
**[[Potential Energy of a Multiparticle System]]&lt;br /&gt;
*[[Work]]&lt;br /&gt;
*[[Work and Energy for an Extended System]]&lt;br /&gt;
*[[Thermal Energy]]&lt;br /&gt;
*[[Conservation of Energy]]&lt;br /&gt;
*[[Electric Potential]]&lt;br /&gt;
*[[Energy Transfer due to a Temperature Difference]]&lt;br /&gt;
*[[Gravitational Potential Energy]]&lt;br /&gt;
*[[Point Particle Systems]]&lt;br /&gt;
*[[Real Systems]]&lt;br /&gt;
*[[Spring Potential Energy]]&lt;br /&gt;
**[[Ball and Spring Model]]&lt;br /&gt;
*[[Internal Energy]]&lt;br /&gt;
**[[Potential Energy of a Pair of Neutral Atoms]]&lt;br /&gt;
*[[Translational, Rotational and Vibrational Energy]]&lt;br /&gt;
*[[Franck-Hertz Experiment]]&lt;br /&gt;
*[[Power (Mechanical)]]&lt;br /&gt;
*[[Transformation of Energy]]&lt;br /&gt;
&lt;br /&gt;
*[[Energy Graphs]]&lt;br /&gt;
**[[Energy graphs and the Bohr model]]&lt;br /&gt;
*[[Air Resistance]]&lt;br /&gt;
*[[Electronic Energy Levels]]&lt;br /&gt;
*[[Second Law of Thermodynamics and Entropy]]&lt;br /&gt;
*[[Specific Heat Capacity]]&lt;br /&gt;
*[[Electronic Energy Levels and Photons]]&lt;br /&gt;
*[[Energy Density]]&lt;br /&gt;
*[[Bohr Model]]&lt;br /&gt;
*[[Quantized energy levels]]&lt;br /&gt;
**[[Spontaneous Photon Emission]]&lt;br /&gt;
*[[Path Independence of Electric Potential]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Collisions===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Collisions]]&lt;br /&gt;
*[[Maximally Inelastic Collision]]&lt;br /&gt;
*[[Elastic Collisions]]&lt;br /&gt;
*[[Inelastic Collisions]]&lt;br /&gt;
*[[Head-on Collision of Equal Masses]]&lt;br /&gt;
*[[Head-on Collision of Unequal Masses]]&lt;br /&gt;
*[[Frame of Reference]]&lt;br /&gt;
*[[Rutherford Experiment and Atomic Collisions]]&lt;br /&gt;
*[[Coefficient of Restitution]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fields===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
* [[Electric Field]] of a&lt;br /&gt;
** [[Point Charge]]&lt;br /&gt;
** [[Electric Dipole]]&lt;br /&gt;
** [[Capacitor]]&lt;br /&gt;
** [[Charged Rod]]&lt;br /&gt;
** [[Charged Ring]]&lt;br /&gt;
** [[Charged Disk]]&lt;br /&gt;
** [[Charged Spherical Shell]]&lt;br /&gt;
** [[Charged Cylinder]]&lt;br /&gt;
** [[Charge Density]]&lt;br /&gt;
**[[A Solid Sphere Charged Throughout Its Volume]]&lt;br /&gt;
*[[Electric Potential]] &lt;br /&gt;
**[[Potential Difference Path Independence]]&lt;br /&gt;
**[[Potential Difference in a Uniform Field]]&lt;br /&gt;
**[[Potential Difference of point charge in a non-Uniform Field]]&lt;br /&gt;
**[[Sign of Potential Difference]]&lt;br /&gt;
**[[Potential Difference in an Insulator]]&lt;br /&gt;
**[[Energy Density and Electric Field]]&lt;br /&gt;
** [[Systems of Charged Objects]]&lt;br /&gt;
*[[Electric Force]]&lt;br /&gt;
*[[Polarization]]&lt;br /&gt;
**[[Polarization of an Atom]]&lt;br /&gt;
*[[Charge Motion in Metals]]&lt;br /&gt;
*[[Charge Transfer]]&lt;br /&gt;
*[[Magnetic Field]]&lt;br /&gt;
**[[Right-Hand Rule]]&lt;br /&gt;
**[[Direction of Magnetic Field]]&lt;br /&gt;
**[[Magnetic Field of a Long Straight Wire]]&lt;br /&gt;
**[[Magnetic Field of a Loop]]&lt;br /&gt;
**[[Magnetic Field of a Solenoid]]&lt;br /&gt;
**[[Bar Magnet]]&lt;br /&gt;
**[[Magnetic Dipole Moment]]&lt;br /&gt;
***[[Stern-Gerlach Experiment]]&lt;br /&gt;
**[[Magnetic Force]]&lt;br /&gt;
**[[Earth&#039;s Magnetic Field]]&lt;br /&gt;
**[[Atomic Structure of Magnets]]&lt;br /&gt;
*[[Combining Electric and Magnetic Forces]]&lt;br /&gt;
**[[Magnetic Torque]]&lt;br /&gt;
**[[Hall Effect]]&lt;br /&gt;
**[[Lorentz Force]]&lt;br /&gt;
**[[Biot-Savart Law]]&lt;br /&gt;
**[[Biot-Savart Law for Currents]]&lt;br /&gt;
**[[Integration Techniques for Magnetic Field]]&lt;br /&gt;
**[[Sparks in Air]]&lt;br /&gt;
**[[Motional Emf]]&lt;br /&gt;
**[[Detecting a Magnetic Field]]&lt;br /&gt;
**[[Moving Point Charge]]&lt;br /&gt;
**[[Non-Coulomb Electric Field]]&lt;br /&gt;
**[[Motors and Generators]]&lt;br /&gt;
**[[Solenoid Applications]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Simple Circuits===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Components]]&lt;br /&gt;
*[[Steady State]]&lt;br /&gt;
*[[Non Steady State]]&lt;br /&gt;
*[[Charging and Discharging a Capacitor]]&lt;br /&gt;
*[[Thin and Thick Wires]]&lt;br /&gt;
*[[Node Rule]]&lt;br /&gt;
*[[Loop Rule]]&lt;br /&gt;
*[[Resistivity]]&lt;br /&gt;
*[[Power in a circuit]]&lt;br /&gt;
*[[Ammeters,Voltmeters,Ohmmeters]]&lt;br /&gt;
*[[Current]]&lt;br /&gt;
**[[AC]]&lt;br /&gt;
*[[Ohm&#039;s Law]]&lt;br /&gt;
*[[Series Circuits]]&lt;br /&gt;
*[[Parallel Circuits]]&lt;br /&gt;
*[[RC]]&lt;br /&gt;
*[[AC vs DC]]&lt;br /&gt;
*[[Charge in a RC Circuit]]&lt;br /&gt;
*[[Current in a RC circuit]]&lt;br /&gt;
*[[Circular Loop of Wire]]&lt;br /&gt;
*[[Current in a RL Circuit]]&lt;br /&gt;
*[[RL Circuit]]&lt;br /&gt;
*[[LC Circuit]]&lt;br /&gt;
*[[Surface Charge Distributions]]&lt;br /&gt;
*[[Feedback]]&lt;br /&gt;
*[[Transformers (Circuits)]]&lt;br /&gt;
*[[Resistors and Conductivity]]&lt;br /&gt;
*[[Semiconductor Devices]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Maxwell&#039;s Equations===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Gauss&#039;s Flux Theorem]]&lt;br /&gt;
**[[Electric Fields]]&lt;br /&gt;
**[[Magnetic Fields]]&lt;br /&gt;
*[[Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of Coaxial Cable Using Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of a Long Thick Wire Using Ampere&#039;s Law]]&lt;br /&gt;
**[[Magnetic Field of a Toroid Using Ampere&#039;s Law]]&lt;br /&gt;
*[[Faraday&#039;s Law]]&lt;br /&gt;
**[[Curly Electric Fields]]&lt;br /&gt;
**[[Inductance]]&lt;br /&gt;
***[[Transformers (Physics)]]&lt;br /&gt;
***[[Energy Density]]&lt;br /&gt;
**[[Lenz&#039;s Law]]&lt;br /&gt;
***[[Lenz Effect and the Jumping Ring]]&lt;br /&gt;
**[[Motional Emf using Faraday&#039;s Law]]&lt;br /&gt;
*[[Ampere-Maxwell Law]]&lt;br /&gt;
*[[Superconductors]]&lt;br /&gt;
**[[Meissner effect]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Radiation===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Producing a Radiative Electric Field]]&lt;br /&gt;
*[[Sinusoidal Electromagnetic Radiaton]]&lt;br /&gt;
*[[Lenses]]&lt;br /&gt;
*[[Energy and Momentum Analysis in Radiation]]&lt;br /&gt;
**[[Poynting Vector]]&lt;br /&gt;
*[[Electromagnetic Propagation]]&lt;br /&gt;
**[[Wavelength and Frequency]]&lt;br /&gt;
*[[Snell&#039;s Law]]&lt;br /&gt;
*[[Effects of Radiation on Matter]]&lt;br /&gt;
*[[Light Propagation Through a Medium]]&lt;br /&gt;
*[[Light Scaterring: Why is the Sky Blue]]&lt;br /&gt;
*[[Light Refraction: Bending of light]]&lt;br /&gt;
*[[Cherenkov Radiation]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Doppler Effect]]&lt;br /&gt;
*[[Nature, Behavior, and Properties of Sound]]&lt;br /&gt;
*[[Resonance]]&lt;br /&gt;
*[[Sound Barrier]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Waves===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Multisource Interference: Diffraction]]&lt;br /&gt;
*[[Standing waves]]&lt;br /&gt;
*[[Gravitational waves]]&lt;br /&gt;
*[[Plasma waves]]&lt;br /&gt;
*[[Wave-Particle Duality]]&lt;br /&gt;
*[[Electromagnetic Waves]]&lt;br /&gt;
*[[Electromagnetic Spectrum]]&lt;br /&gt;
*[[Color Light Wave]]&lt;br /&gt;
*[[Mechanical Waves]]&lt;br /&gt;
*[[Pendulum Motion]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Real Life Applications of Electromagnetic Principles===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Electromagnetic Junkyard Cranes]]&lt;br /&gt;
*[[Maglev Trains]]&lt;br /&gt;
*[[Spark Plugs]]&lt;br /&gt;
*[[Metal Detectors]]&lt;br /&gt;
*[[Speakers]]&lt;br /&gt;
*[[Radios]]&lt;br /&gt;
*[[Ampullae of Lorenzini]]&lt;br /&gt;
*[[Generator]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Optics===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[Mirrors]]&lt;br /&gt;
*[[Refraction]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Computing===&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
*[[VPython]]&lt;br /&gt;
*[[VPython basics]]&lt;br /&gt;
*[[VPython Troubleshooting]]&lt;br /&gt;
*[[VPython Multithreading]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* Commonly used wiki commands [https://en.wikipedia.org/wiki/Help:Cheatsheet Wiki Cheatsheet]&lt;br /&gt;
* A guide to representing equations in math mode [https://en.wikipedia.org/wiki/Help:Displaying_a_formula Wiki Math Mode]&lt;br /&gt;
* A page to keep track of all the physics [[Constants]]&lt;br /&gt;
* A page for review of [[Vectors]] and vector operations&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11944</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11944"/>
		<updated>2015-12-04T15:28:24Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11942</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11942"/>
		<updated>2015-12-04T15:27:57Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Syntax Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
===While Loop Indentation===&lt;br /&gt;
&lt;br /&gt;
In Python, while loops and if statements rely on indentation to define where they start and end.  When you&#039;re working with a while loop, &#039;&#039;&#039;every line of code inside the loop should have the same number of spaces in front of it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     # Calculate Fgrav btwn. craft and the Earth&lt;br /&gt;
    rCraftEarth = Craft.pos - Earth.pos     &amp;lt;- Error: incorrect indentation&lt;br /&gt;
     fMagG1 = (G * mCraft * mEarth)/(mag(rCraftEarth) * mag(rCraftEarth))&lt;br /&gt;
&lt;br /&gt;
If you fail to indent a line in the middle of a loop, Python is quite good about reporting it.  If you fail to indent a line at the end of a loop, Python assumes you meant for it to be outside of the loop, which does not generate any error but can cause your code to work incorrectly.&lt;br /&gt;
&lt;br /&gt;
 while t &amp;lt;= 3.0:&lt;br /&gt;
     rate(3500)       ## slow down motion to make animation look nicer&lt;br /&gt;
 &lt;br /&gt;
     (...)&lt;br /&gt;
 &lt;br /&gt;
 t = t + deltat    &amp;lt;- This line should be in the loop, but it is not.&lt;br /&gt;
&lt;br /&gt;
What belongs in the loop?  The hard and fast answer is &#039;&#039;&#039;anything that need to happen over and over again&#039;&#039;&#039;.  That&#039;s what the loop does: it runs the same code over and over again until its condition tells it to stop.  If you&#039;re animating an object that is experiencing a gravitational force, obviously we need to calculate the force over and over again.  We also need to update the particle&#039;s position and update the arrow each time as well.&lt;br /&gt;
&lt;br /&gt;
Anything outside of the loop is executed only once.  In the example above, we left updating the time out of the loop.  Obviously, we meant for the time to increase with each run of the loop, but by leaving it out, this doesn&#039;t happen (n this particular example, because the loop depends on the time to know when to stop, the program would loop infinitely and our particle would never stop moving).&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11921</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11921"/>
		<updated>2015-12-04T15:06:03Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Make sure parenthesis match up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE reported the syntax error):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11919</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11919"/>
		<updated>2015-12-04T15:02:08Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Syntax Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red  &amp;lt;- Actual problem is HERE&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Python reports error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11918</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=11918"/>
		<updated>2015-12-04T15:00:51Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Rules for variable names */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
When Python is reading your code, it has to be able to identify when you are referring to a variable, as opposed to some other language construct, such as a literal number.  Here are a few rules to keep in mind:&lt;br /&gt;
&lt;br /&gt;
* Variable names cannot contain spaces&lt;br /&gt;
* Variable names cannot start with a number&lt;br /&gt;
* Variable names cannot contain dashes (-), but underscores (_) are allowed&lt;br /&gt;
* Variable must not have the same name as built-in functions, statements, etc.&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10914</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10914"/>
		<updated>2015-12-03T22:56:05Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Syntax Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
===Rules for variable names===&lt;br /&gt;
&lt;br /&gt;
Variable names cannot contain spaces. (TODO: list other rules for variable names)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10913</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10913"/>
		<updated>2015-12-03T22:55:33Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* TypeError: &amp;#039;*&amp;#039; object is not callable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).  Remember, the name of variables is just a name—&#039;&#039;&#039;you can name your variables whatever you want, &#039;&#039;just don&#039;t name it after an existing function&#039;&#039;&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10911</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10911"/>
		<updated>2015-12-03T22:53:58Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* TypeError: &amp;#039;*&amp;#039; object is not callable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;electron&amp;lt;/code&amp;gt; (assuming the sphere represents an electron).&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10910</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10910"/>
		<updated>2015-12-03T22:53:33Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* TypeError: &amp;#039;*&amp;#039; object is not callable */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.  Instead, simply name you &amp;lt;code&amp;gt;sphere&amp;lt;/code&amp;gt; something like &amp;lt;code&amp;gt;mySphere&amp;lt;/code&amp;gt; or even better, use a precise name such as &amp;lt;code&amp;gt;sphereA&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10909</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10909"/>
		<updated>2015-12-03T22:52:22Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Runtime Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: &#039;*&#039; object is not callable ===&lt;br /&gt;
&lt;br /&gt;
In Python, function names are variables too, and are not protected in any way.  Because of this, it is totally legal to write:&lt;br /&gt;
&lt;br /&gt;
 vector = vector(5, 4, 3)&lt;br /&gt;
&lt;br /&gt;
Here, we just replaced the vector function with, well, an actual vector.  When we try to create another vector later, we&#039;re actually attempting to call our vector variable as if it were a function.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you do not name a variable the same name as a function&#039;&#039;&#039;!&lt;br /&gt;
&lt;br /&gt;
Also resist the temptation to create a sphere named sphere:&lt;br /&gt;
&lt;br /&gt;
 sphere = sphere(pos=(1,0,0), radius=2e-11, color=color.red)  // Our &amp;quot;sphere&amp;quot; just replaced the &amp;quot;sphere&amp;quot; function&lt;br /&gt;
&lt;br /&gt;
If you do this, the error will not show up until you try to use the &amp;lt;code&amp;gt;sphere()&amp;lt;/code&amp;gt; function later, which may be several lines after the actual mistake.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10907</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10907"/>
		<updated>2015-12-03T22:47:37Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* Syntax Errors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
A syntax error means Python cannot figure out what your program is asking it to do because you did not follow its grammar. VIDLE will highlight where the error occurred, but sometimes this highlight is misleading.&lt;br /&gt;
&lt;br /&gt;
===Make sure parenthesis match up ===&lt;br /&gt;
&lt;br /&gt;
Consider the following code (asterisks were placed around the part that where IDLE said the syntax error was):&lt;br /&gt;
&lt;br /&gt;
 ## objects&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red&lt;br /&gt;
 &lt;br /&gt;
 ## initial values&lt;br /&gt;
 ***obslocation*** = vector(3.1e-10, -2.1e-10, 0)  &amp;lt;- Error at word &amp;quot;obslocation&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can look at that line all you want, but there is no error there.  Instead, look at the end of the &amp;lt;code&amp;gt;particle = sphere(...&amp;lt;/code&amp;gt; line.  Notice there is no closing parenthesis.&lt;br /&gt;
&lt;br /&gt;
To fix this error, change the line to:&lt;br /&gt;
&lt;br /&gt;
 particle = sphere(pos=vector(1e-10,0,0), radius=2e-11, color=color.red)    &amp;lt;- closing parenthesis added&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10903</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10903"/>
		<updated>2015-12-03T22:41:22Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* ArgumentError: Python argument types in *** did not match C++ signature */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;br /&gt;
&lt;br /&gt;
Hence, when you see these kind of errors, always inspect the arguments you pass to the function, and if any of them are a variable, &#039;&#039;&#039;look back at how the variable was defined&#039;&#039;&#039;.  If all else fails, try placing each argument into a &amp;lt;code&amp;gt;print()&amp;lt;/code&amp;gt; statement separately and make sure what prints out is the type you expect.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10902</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10902"/>
		<updated>2015-12-03T22:38:18Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;br /&gt;
&lt;br /&gt;
=== ArgumentError: Python argument types in *** did not match C++ signature ===&lt;br /&gt;
&lt;br /&gt;
If you pass the wrong type of data to a function, VPython prints all kinds of nasty jargon out.&lt;br /&gt;
&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     None.None(arrow, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     None(cvisual::primitive {lvalue}, cvisual::vector)&lt;br /&gt;
&lt;br /&gt;
What the heck is a &amp;lt;code&amp;gt;cvisual::primitive {lvalue}&amp;lt;/code&amp;gt;?  Who knows? (it&#039;s some internal data type in the C++ code for VPython, and it&#039;s an error in VPython that we see this message instead of a nicer, more explanatory one).  Our code that caused this error:&lt;br /&gt;
&lt;br /&gt;
 r = sqrt(5 ** 2 + 4 ** 2 + 3**2)&lt;br /&gt;
 ea = arrow(pos=r, axis=E*scale, color=color.orange)&lt;br /&gt;
&lt;br /&gt;
r was likely assumed to be a vector, but it actually appears to hold the magnitude of a vector someone calculated.&lt;br /&gt;
&lt;br /&gt;
Consider another example:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 33&lt;br /&gt;
     r = vector(x, 5, 2)&lt;br /&gt;
 ArgumentError: Python argument types in&lt;br /&gt;
     vector.__init__(vector, vector, int, int)&lt;br /&gt;
 did not match C++ signature:&lt;br /&gt;
     __init__(_object*, cvisual::vector)&lt;br /&gt;
     __init__(_object*)&lt;br /&gt;
     __init__(_object*, double)&lt;br /&gt;
     __init__(_object*, double, double)&lt;br /&gt;
     __init__(_object*, double, double, double)&lt;br /&gt;
&lt;br /&gt;
The error points at this line:&lt;br /&gt;
&lt;br /&gt;
 r = vector(x, 5, 2)&lt;br /&gt;
&lt;br /&gt;
Huh.  That looks OK.  Let&#039;s see how x is defined:&lt;br /&gt;
&lt;br /&gt;
 x = particle.pos&lt;br /&gt;
 print(x)     // prints out &amp;lt;5, 4, 3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apparently x is a vector.  So the line that threw the error looks like this to the computer:&lt;br /&gt;
&lt;br /&gt;
 r = vector(vector(5, 4, 3), 5, 2)     // This clearly doesn&#039;t make any sense&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10892</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10892"/>
		<updated>2015-12-03T22:21:48Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* TypeError: unsupported operand type(s) for * */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * that&lt;br /&gt;
&lt;br /&gt;
Some other operations to look out for:&lt;br /&gt;
&lt;br /&gt;
* Adding or subtracting a scalar from a vector or vice-versa&lt;br /&gt;
* Divining a scalar by a vector&lt;br /&gt;
* Multiplying or dividing two vectors&lt;br /&gt;
&lt;br /&gt;
In VPython, there&#039;s no syntax to indicate that a variable is a vector. The easiest way to tell is look at where it was defined.  For example, if we created the variable &amp;lt;code&amp;gt;position&amp;lt;/code&amp;gt; with any of these lines of code, it would hold a vector:&lt;br /&gt;
&lt;br /&gt;
 position = vector(5, 4, 3)&lt;br /&gt;
 position = (5, 4, 3)&lt;br /&gt;
 position = arrow.pos     // arrow.pos is a vector property of the arrow object&lt;br /&gt;
 position = arrow.pos * 5     // vector multiplied by a scalar is a vector&lt;br /&gt;
&lt;br /&gt;
When tracing these errors, always look and make sure your variables hold the type of data you expect.  When all else fails, you can use &amp;lt;code&amp;gt;print(variable name)&amp;lt;/code&amp;gt; to examine the value.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10879</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10879"/>
		<updated>2015-12-03T22:10:27Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
Even if Python understands the syntax of your program, it can still contain errors that pop up when it tries to run.&lt;br /&gt;
&lt;br /&gt;
=== TypeError: unsupported operand type(s) for * ===&lt;br /&gt;
&lt;br /&gt;
Consider this error and the line of code that produced it:&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/lab2.py&amp;quot;, line 32&lt;br /&gt;
     E = oofpez * (qproton / (r**2)) * rhat&lt;br /&gt;
 TypeError: unsupported operand type(s) for ** or pow(): &#039;vector&#039; and &#039;int&#039;&lt;br /&gt;
&lt;br /&gt;
The error indicates that &amp;lt;code&amp;gt;pow()&amp;lt;/code&amp;gt;, i.e. the exponent function, cannot operate on a &amp;lt;code&amp;gt;vector&amp;lt;/code&amp;gt; and an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; (an int is short for integer, a.k.a. a number/scalar).&lt;br /&gt;
&lt;br /&gt;
 r = vector(5, 4, 3) - particle.pos&lt;br /&gt;
 rmag = sqrt(r.x**2 + r.y**2 + r.z**2)&lt;br /&gt;
 rhat = r / rmag&lt;br /&gt;
 E = oofpez * (qproton / (r**2)) * rhat  &amp;lt;-- ERROR&lt;br /&gt;
&lt;br /&gt;
Looking at the code, we see that we typed &amp;lt;code&amp;gt;r ** 2&amp;lt;/code&amp;gt;, i.e. squaring the vector r, or as we&#039;d write it out on paper:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\vec{r}^2 = \vec{r} * \vec{r} = &amp;lt;5, 4, 3&amp;gt; * &amp;lt;5, 4, 3&amp;gt;&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve taken linear algebra before, you&#039;re probably aware that multiplying vectors or matrices is very different from simply multiplying out scalars, and in fact, in this case, is undefined.  The correct code here might have been:&lt;br /&gt;
&lt;br /&gt;
 E = oofpez * (qproton / (rmag**2)) * rhat&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10851</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10851"/>
		<updated>2015-12-03T21:51:53Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* NameError: name &amp;#039;*&amp;#039; is not defined */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;gdisplay&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover various messages involving errors in vector operations, etc.)&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10219</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10219"/>
		<updated>2015-12-03T17:00:18Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* &amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;*&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update.&lt;br /&gt;
 Unfortunately, this application, or a library it uses, is using this obsolete function, &lt;br /&gt;
 and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover various messages involving errors in vector operations, etc.)&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10217</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10217"/>
		<updated>2015-12-03T17:00:00Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;*&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;The function ‘CGContextErase’ is obsolete&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
Users on Mac OS X may see this message printed whenever they run a VPython program:&lt;br /&gt;
&lt;br /&gt;
 The function ‘CGContextErase’ is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, &lt;br /&gt;
 is using this obsolete function, and is thereby contributing to an overall degradation of system performance.&lt;br /&gt;
&lt;br /&gt;
This message can be ignored and will have no impact on the running of your program.&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover various messages involving errors in vector operations, etc.)&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10207</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10207"/>
		<updated>2015-12-03T16:57:19Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
Python has only a small number of [https://docs.python.org/2/library/functions.html built-in functions].  The rest are stored in &amp;quot;modules&amp;quot; that you can load when you need them.  The &amp;lt;code&amp;gt;from (blank) import (blank)&amp;lt;/code&amp;gt; lines tell Python to import the named functions from a specific module.  When you import a module, Python searches various folders on your computer to find the requested module.  If it cannot find a module with that name, you get an ImportError.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #1:&#039;&#039;&#039; You made a typo in the module name.&lt;br /&gt;
&lt;br /&gt;
The basic boilerplate for VPython programs written in this class:&lt;br /&gt;
&lt;br /&gt;
 from __future__ import division&lt;br /&gt;
 from visual import *&lt;br /&gt;
&lt;br /&gt;
Often missed are the &#039;&#039;&#039;two underscores&#039;&#039;&#039; (&amp;lt;code&amp;gt; _ _ &amp;lt;/code&amp;gt;) not separated by a space before and after &amp;lt;code&amp;gt;future&amp;lt;/code&amp;gt;.  Check that this is correct, or copy-and-paste from above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cause #2:&#039;&#039;&#039; VPython is not installed correctly.&lt;br /&gt;
&lt;br /&gt;
It is possible the module actually does not exist on your system.  The VPython installer should install all the needed modules into the module folder for Python 2.7.  If you have a different version of Python installed, it will not be able to find the modules.  Make sure to follow the instructions on the VPython website, and install Python 2.7 from python.org as suggested.&lt;br /&gt;
&lt;br /&gt;
=== NameError: name &#039;*&#039; is not defined ===&lt;br /&gt;
&lt;br /&gt;
This is often indicative of a missing import statement.  Make sure your code begins with the boilerplate code above.&lt;br /&gt;
&lt;br /&gt;
If you are using the graph functions, you will also need:&lt;br /&gt;
&lt;br /&gt;
 from visual.graph import *&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover various messages involving errors in vector operations, etc.)&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10165</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10165"/>
		<updated>2015-12-03T16:25:02Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;br /&gt;
&lt;br /&gt;
== Syntax Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover common syntax errors)&lt;br /&gt;
&lt;br /&gt;
== Runtime Errors ==&lt;br /&gt;
&lt;br /&gt;
(work in progress; will cover various messages involving errors in vector operations, etc.)&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10159</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10159"/>
		<updated>2015-12-03T16:23:01Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: /* ImportError: No module named &amp;quot;*&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named * ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10158</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10158"/>
		<updated>2015-12-03T16:22:47Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportError: No module named &amp;quot;*&amp;quot; ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10138</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10138"/>
		<updated>2015-12-03T16:04:12Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.  &lt;br /&gt;
&lt;br /&gt;
=== VPython does not start or immediately freezes ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.  This is because of a bug in the way regular IDLE executes code, it has difficulty with programs that keep running in a loop, as VPython does so you can drag and zoom the display.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== ImportErrors of various forms ===&lt;br /&gt;
&lt;br /&gt;
 Traceback (most recent call last):&lt;br /&gt;
   File &amp;quot;/my/documents/folder/vectors.py&amp;quot;, line 1&lt;br /&gt;
     from future import division&lt;br /&gt;
 ImportError: No module named future&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10133</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10133"/>
		<updated>2015-12-03T15:47:38Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First, make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;br /&gt;
&lt;br /&gt;
With the most current releases of VPython, code compiles and launches fine in IDLE, but the graphics window comes up grey and hangs.&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;if you double-click a .py file in Windows Explorer or Finder, it may open up in the regular IDLE instead of VIDLE&#039;&#039;&#039;.  To check if your code is open in VIDLE, click the &amp;quot;Help&amp;quot; menu and look for the &amp;quot;VPython&amp;quot; menu item.  Regular IDLE does not have a &amp;quot;VPython&amp;quot; item in the Help menu.&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10128</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10128"/>
		<updated>2015-12-03T15:40:04Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First, make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:use_vidle.jpg|300px|thumb|left|Use VIDLE instead of IDLE to avoid errors and crashes.]]&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=File:Use_vidle.jpg&amp;diff=10127</id>
		<title>File:Use vidle.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=File:Use_vidle.jpg&amp;diff=10127"/>
		<updated>2015-12-03T15:38:55Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
	<entry>
		<id>http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10126</id>
		<title>VPython Common Errors and Troubleshooting</title>
		<link rel="alternate" type="text/html" href="http://www.physicsbook.gatech.edu/index.php?title=VPython_Common_Errors_and_Troubleshooting&amp;diff=10126"/>
		<updated>2015-12-03T15:38:20Z</updated>

		<summary type="html">&lt;p&gt;Lucasec: Created page with &amp;quot;(Lucas Christian, page 1 of 2)  This reference lists out some common errors I&amp;#039;ve seen students encounter while working in VPython.  Programming languages can often generate ob...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Lucas Christian, page 1 of 2)&lt;br /&gt;
&lt;br /&gt;
This reference lists out some common errors I&#039;ve seen students encounter while working in VPython.  Programming languages can often generate obscure and confusing error messages, and VPython is no exception.&lt;br /&gt;
&lt;br /&gt;
==System/Environment Errors==&lt;br /&gt;
&lt;br /&gt;
If your system is not set up correctly, or the environment you are running VPython code is incorrect, a number of mysterious errors can result.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;First, make sure you are running your code in VIDLE (not the identical-looking IDLE).&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Lucasec</name></author>
	</entry>
</feed>