-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for #69,#71, and #72 #77
Conversation
@@ -16,6 +16,8 @@ | |||
from importlib import import_module | |||
import os | |||
import inspect | |||
from drivers.APS import APS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that this line is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it you can't run AWGs.py as a standalone for testing. You'll get
the error below.
python AWGs.py
Registered Driver APS2
Registered Driver Tek5014
Registered Driver Tek7000
:0: FutureWarning: IPython widgets are experimental and may change in
the future.
Traceback (most recent call last):
File "AWGs.py", line 30, in
awg = APS(label='BBNAPS1')
NameError: name 'APS' is not defined
On 9/24/15 3:11 PM, Blake Johnson wrote:
In instruments/AWGs.py
#77 (comment):@@ -16,6 +16,8 @@
from importlib import import_module
import os
import inspect
+from drivers.APS import APSI suspect that this line is not necessary.
—
Reply to this email directly or view it on GitHub
https://github.com/BBN-Q/PyQLab/pull/77/files#r40359775.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but that is not the problem. If you look at the output you just pasted there, you see that it failed to register the 'APS' driver, but picked up all the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I change awg=APS2(...) I get a similar failure even though the APS2
driver was registered. I'm not sure what's going on here but I'll dig
into it. I'm cc'ing Brian D as well to see if he has an idea why this
does not work.
Registered Driver APS2
Registered Driver Tek5014
Registered Driver Tek7000
:0: FutureWarning: IPython widgets are experimental and may change in
the future.
Traceback (most recent call last):
File "AWGs.py", line 28, in
awg = APS2(label='BBNAPS1')
NameError: name 'APS2' is not defined
On 9/24/15 3:19 PM, Robert McGurrin wrote:
Without it you can't run AWGs.py as a standalone for testing. You'll
get the error below.python AWGs.py
Registered Driver APS2
Registered Driver Tek5014
Registered Driver Tek7000
:0: FutureWarning: IPython widgets are experimental and may change in
the future.
Traceback (most recent call last):
File "AWGs.py", line 30, in
awg = APS(label='BBNAPS1')
NameError: name 'APS' is not definedOn 9/24/15 3:11 PM, Blake Johnson wrote:
In instruments/AWGs.py
#77 (comment):@@ -16,6 +16,8 @@
from importlib import import_module
import os
import inspect
+from drivers.APS import APSI suspect that this line is not necessary.
—
Reply to this email directly or view it on GitHub
https://github.com/BBN-Q/PyQLab/pull/77/files#r40359775.
@rmcgurrin What is your test setup. I have not been able to replicate having the APS module missing. One thing that I noticed is that the Where are you running python from. Inside the instruments directory? |
I'm tempted just to remove these |
@bdonavan I'm tried both running from the instruments dir and the PyQlab On 9/25/15 10:00 AM, Brian Donovan wrote:
|
It is kind of nice when you want to just run a smaller standalone pieces On 9/25/15 10:25 AM, Blake Johnson wrote:
|
Yeah, I like the `if name == main`` for quick testing from a text editor. |
BBN-Q#69 In the Looper Form of MeasFilterViews.enaml, test that the selected filter is in the filter dictionary else return -1 BBN-Q#71 In the QtListStrWidget, test if the enable changed when the labels are the same and the label is in the item list. Also, only signal a name change when the labels are not the same and the newlabel is not in the item list. In the old version of code there are some conditions when on_edit is called that result in the dictionary manager trying to rename an item that does not exist. BBN-Q#72 Added a new feature to save config in a different directory and load a config from a different directory. After loading a config, the GUI will restart itself for the changes to take effectively
I updated AWGs.py to move the if Also, changing allows the script to run but I'm really not sure exactly why that is needed. The good news is that with these changes you can run AWGs.py as a standalone. The bad news is that when you do run it as a standalone you get some strange results regarding loading the drivers: they get loaded multiple times like below: Registered Driver APS2 Some of this behavior can be possibly attributed to circular imports. This does not happen when ExpSettingsGUI runs. |
#69
In the Looper Form of MeasFilterViews.enaml, test that the selected
filter is in the filter dictionary else return -1
#71
In the QtListStrWidget, test if the enable changed when the labels are the same
and the label is in the item list. Also, only signal a name change when the
labels are not the same and the newlabel is not in the item list. In the old
version of code there are some conditions when on_edit is called that result in
the dictionary manager trying to rename an item that does not exist.
#72
Added a new feature to save config in a different directory and load a config
from a different directory. After loading a config, the GUI will restart itself
for the changes to take effectively