Closed ambarb closed 7 years ago
I think I see the problem. You are editing a function named FS_refO
but (sometimes) you are running a completely different function named FS_O
. Is that the whole problem?
ugh yes. As you can see, we are tired. I reversed search and was not paying close attention. Should have been obvious with the number of points.
On Thu, 2 Mar 2017, ambarb wrote:
ugh yes. As you can see, we are tired. I reversed search and was not paying close attention. Should have been obvious with the number of points.
On other occasions you may have hit the issue where the docstring gets updated but not the def if you reimport but not reload?
%autoreload can be nice -matt
In [1]: import foo
In [2]: foo.lala?? Type: function String Form:<function lala at 0x1a31230> File: /tmp/blarf/foo.py Definition: foo.lala() Source: def lala(): "lala prints woof" print "woo"
In [3]: foo.lala() woo
In [4]: import foo
In [5]: foo.lala?? Type: function String Form:<function lala at 0x1a31230> File: /tmp/blarf/foo.py Definition: foo.lala() Source: def lala(): "lala prints woof!" print "woot"
In [7]: reload(foo) Out[7]: <module 'foo' from 'foo.py'>
In [8]: foo.lala?? Type: function String Form:<function lala at 0x1a312a8> File: /tmp/blarf/foo.py Definition: foo.lala() Source: def lala(): "lala prints woof!" print "woot"
@tacaswell @danielballan This is the 2nd or 3rd time that I have seen this behavior at the endstation. This has also happened with .ipynb with functions defined in a cell. Please advise me on how to avoid this situation (alternatively, I will quit python seesions before defining a function.)
FYI @cmazzoli @wen-hu
I defined a function (without print or sleep on the second two lines). I realized that I needed to change a value because the sample is different for the
sz
. After I corrected the sz, nothing new happened (that is sz did not move). I then added a print statement and a bp.sleep(). The print statement did not happen and the bp.sleep() typo did not generate an error. The function just simply did the scan. The function is defined in memory to perform a print sz position, sleep, and then move sz. Restart of bsui corrected this issue. I would like to know what I am doing to make this happen to me so often.Here is where i realized i needed to correct the sz conditional statement. I did so. I later realized that delta, theta and gamma did not move.
Below, sz is at 0.83 so i should move sz -0.3 relataive. It does not. Then I added a print statement to see if it would print the position. It does not. It also does not catch the typo in the sleep line.
exit bsui session and restart seemed to fixed (and correctly found my typo on third line of function definition after printing the sz position.
Below that bs was not defined and I corrected the typo.. Line 12 shows successful update of definition.