labscript-suite-temp / labscript

The labscript Python library provides a translation from simple Python code to complex hardware instructions. The library is used to construct a "connection table" containing information about what hardware is being used and how it is interconnected. Devices described in this connection table can then have their outputs set by using a range of functions, including arbitrary ramps.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Failure when there is no master pseudoclock is ungraceful #12

Closed philipstarkey closed 10 years ago

philipstarkey commented 10 years ago

Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


If you don't define a master pseudoclock (or any devices), you get this obtuse thing:

#!python

Traceback (most recent call last):
  File "/home/bilbo/Desktop/user_scripts/labscriptlib/spinor/__init__.py", line 8, in <module>
    start()
  File "/home/bilbo/bitbucket_clones/labscript/labscript.py", line 1593, in start
    master_pseudoclock, = [pseudoclock for pseudoclock in all_pseudoclocks if pseudoclock.is_master_pseudoclock]
ValueError: need more than 0 values to unpack

This is pretty simple, let's put a better error message there if stop() gets called and there is no master pseudoclock

philipstarkey commented 10 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Resolves issue #14 and issue #12

→ \<\<cset 858e02a33060b6e03fae7e0c24d08da7c385562f>>