Steps to reproduce
- Create an instrument that fails (e.g. timeout, invalid arguments etc)
- The name of the instrument gets added to the list of existing instruments
- This prevents creating an instrument with the same name that does not fail.
- This is a problem because you want to create an instrument with that name when you fixed e.g. your invalid input argument/address or driver bug.
Expected behaviour
The name of the instrument does not get added to the list of current instruments
Actual behaviour
The name of the instrument gets added to the list of instruments preventing any other instrument from being created with that name, even though no instrument with the name actually exists.
Workaround
As suggested by @alexcjohnson use Instrument.find_instrument(name).close() to close the non-existing instrument.