labscript-suite / labscript

The 𝗹𝗮𝗯𝘀𝗰𝗿𝗶𝗽𝘁 library provides a translation from expressive Python code to low-level hardware instructions.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
9 stars 48 forks source link

Failure when there is no master pseudoclock is ungraceful #12

Closed philipstarkey closed 9 years ago

philipstarkey commented 9 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 9 years ago

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


Resolves issue #14 and issue #12

→ \<\<cset 40ccc11bd0725d37c7800f8605f2ab194d07c31b>>