This issue arises for instance with COM port setting which are different on each computer. For instance, if the comport is set to COM3 in the SMC100 controller but the motor is actually connected to COM8, the instrument can not be created. The easy fix is to change the default value in the instrument class in the .py file. However, in the future, it would be better to catch this behaviour.
Future upgrade:
1) if instrument can't be loaded because of a parameter setting raise a ParameterValueError (to be defined by us)
2) the export default gui catches this error, informs the user and ask if she wants to try with another value (showing the possible values in a dropdown if the valid values is a list)
3) try again with the new value
=> as a result, all the .b26 files created with the export dialog should be valid on the computer where they are created and one doesn't have to change the .py code when switching computers.
This issue arises for instance with COM port setting which are different on each computer. For instance, if the comport is set to COM3 in the SMC100 controller but the motor is actually connected to COM8, the instrument can not be created. The easy fix is to change the default value in the instrument class in the .py file. However, in the future, it would be better to catch this behaviour.
Future upgrade: 1) if instrument can't be loaded because of a parameter setting raise a ParameterValueError (to be defined by us) 2) the export default gui catches this error, informs the user and ask if she wants to try with another value (showing the possible values in a dropdown if the valid values is a list) 3) try again with the new value
=> as a result, all the .b26 files created with the export dialog should be valid on the computer where they are created and one doesn't have to change the .py code when switching computers.