Jupyter-Kale / kale

Jupyter Interactive Workflows for High Performance Computing
Other
15 stars 3 forks source link

Catch MongoDB error #33

Open OliverEvans96 opened 7 years ago

OliverEvans96 commented 7 years ago

If mongo isn't running, there will be a timeout error which isn't displayed. Meanwhile, we get

---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
<ipython-input-4-350e35eda54e> in <module>()
      1 wpw = WorkerPoolWidget()
----> 2 wpw.add_pool("Laptop", 3)
      3 wpw.add_pool("Cori", 32, "cori.nersc.gov")
      4 wpw

~/lbl/jupyter_hpc/workflow_widgets.py in add_pool(self, name, num_workers, location)
    434             )
    435 
--> 436             self._pool_dict[name] = pool
    437             self._pool_list.append(
    438                 (pool.name, pool)

UnboundLocalError: local variable 'pool' referenced before assignment

which isn't very helpful if you don't know what it means.