{"action":"created","issue":{"url":"https://api.github.com/repos/NSLS-II/bluesky/issues/1072","repository_url":"https://api.github.com/repos/NSLS-II/bluesky","labels_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/1072/labels{/name}","comments_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/1072/comments","events_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/1072/events","html_url":"https://github.com/NSLS-II/bluesky/issues/1072","id":344174684,"node_id":"MDU6SXNzdWUzNDQxNzQ2ODQ=","number":1072,"title":"Unstable state:  cannot ^C a plan and then finally do.  then RE stuck in running","user":{"login":"ambarb","id":13630233,"node_id":"MDQ6VXNlcjEzNjMwMjMz","avatar_url":"https://avatars3.githubusercontent.com/u/13630233?v=4","gravatar_id":"","url":"https://api.github.com/users/ambarb","html_url":"https://github.com/ambarb","followers_url":"https://api.github.com/users/ambarb/followers","following_url":"https://api.github.com/users/ambarb/following{/other_user}","gists_url":"https://api.github.com/users/ambarb/gists{/gist_id}","starred_url":"https://api.github.com/users/ambarb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambarb/subscriptions","organizations_url":"https://api.github.com/users/ambarb/orgs","repos_url":"https://api.github.com/users/ambarb/repos","events_url":"https://api.github.com/users/ambarb/events{/privacy}","received_events_url":"https://api.github.com/users/ambarb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-07-24T19:36:15Z","updated_at":"2018-08-22T23:36:00Z","closed_at":null,"author_association":"NONE","body":"```python\r\nIn [929]: %run -i ~/.ipython/profile_collection/plans/03-plan.py\r\n\r\nIn [930]: RE(my_plan_overnight())\r\n                                                                                                                                                                     \r\nFinished moving the polarization to horizontal.\r\n\r\nStarting plan for H polarized light with 12 rixs images for each Ei = [576.5, 576.5, 579.3, 579.3, 580.5, 580.5]\r\nMove m3diag to \"yag\"                                                                                                                                                 \r\nA 'deferred pause' has been requested. The RunEngine will pause at the next checkpoint. To pause immediately, hit Ctrl+C again in the next 10 seconds.:30,  2.02s/mm]\r\nDeferred pause acknowledged. Continuing to checkpoint.\r\nm3Pausing...8%|████████▎                                                                                                    | 3.6856/48.3995 [00:07<01:30,  2.02s/mm]\r\n---------------------------------------------------------------------------\r\nRunEngineInterrupted                      Traceback (most recent call last)\r\n~/.ipython/profile_collection/plans/03-plan.py in <module>()\r\n----> 1 RE(my_plan_overnight())\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/bluesky/run_engine.py in __call__(self, *args, **metadata_kw)\r\n    745 \r\n    746             if self._interrupted:\r\n--> 747                 raise RunEngineInterrupted(self.pause_msg) from None\r\n    748 \r\n    749         return tuple(self._run_start_uids)\r\n\r\nRunEngineInterrupted: \r\nYour RunEngine is entering a paused state. These are your options for changing\r\nthe state of the RunEngine:\r\n\r\nRE.resume()    Resume the plan.\r\nRE.abort()     Perform cleanup, then kill plan. Mark exit_stats='aborted'.\r\nRE.stop()      Perform cleanup, then kill plan. Mark exit_status='success'.\r\nRE.halt()      Emergency Stop: Do not perform cleanup --- just stop.\r\n\r\n\r\nIn [931]: \r\n\r\nIn [931]: RE.abort()\r\nAborting: running cleanup and marking exit_status as 'abort'...\r\nOOPS!  The plan stopped.  The completed scans are:                                                                                                                   \r\n\r\n\r\n                                                                                                                                                                     \r\nFinished moving the polarization to horizontal.                                                                                                                      \r\n\r\nStarting plan for H polarized light with 12 rixs images for each Ei = [579.3, 579.3, 580.5, 580.5]\r\nMove m3diag to \"yag\"                                                                                                                                                 \r\nTransient Scan ID: 20486     Time: 2018/07/21 21:39:14                                                                                                               \r\nPersistent Unique Scan ID: '2bcc4bfe-8aee-4a3c-aa48-ef57580e9642'\r\nNew stream: 'baseline'\r\nStart-of-run baseline readings:\r\n+--------------------------------+--------------------------------+\r\n|                      ring_curr | 375.59476449029074             |\r\n|                gc_tcg_pressure | 0.0                            |\r\n|              epu1_gap_readback | 32.709                         |\r\n```\r\n### I let the plan continue a bit because there were some scans that I didn'want to kill for beamline reasons.  I hit ^C at the begnning because the FE shutter was closed.  When the plan continued anyway, I just manually reopend the shutter.  At one point, I thought we had suspenders on, but stay tuned for that at the end of this report.\r\n\r\n```python\r\n|                      dcslt_inb | 17.999000000000002             |\r\n|                      dcslt_out | 45.0                           |\r\n|                      dcslt_bot | 11.002000000000002             |\r\n|                      dcslt_top | 9.999999999999996              |\r\n|                           dc_z | 180.00145                      |\r\n|                       dc_twoth | 149.1997172586                 |\r\n+--------------------------------+--------------------------------+\r\n\r\n\r\n\r\nMove gcdiag to \"grid\"                                                                                                                                                \r\ngcdiag_y:   4%|████▋                                                                                                        | 4.0961/94.4001 [00:04<01:31,  1.02s/mm]\r\ngcdiag_y:   5%|█████▎                                                                                                       | 4.5914/94.4001 [00:04<01:31,  1.02s/mm]\r\ngcdiag_y:   5%|█████▊                                                                                                        | 4.947/94.4001 [00:05<01:30,  1.01s/mm]\r\ngcdiag_y:   6%|██████                                                                                                       | 5.2683/94.4001 [00:05<01:30,  1.01s/mm]\r\ngcdiag_y:   6%|██████▌                                                                                                       | 5.591/94.4001 [00:05<01:29,  1.01s/mm]\r\ngc---------------------------------------------------------------------------                                               | 5.6975/94.4001 [00:05<01:29,  1.01s/mm]\r\nKeyboardInterrupt                         Traceback (most recent call last)\r\n~/.ipython/profile_collection/plans/03-plan.py in <module>()\r\n----> 1 RE.abort()\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/bluesky/run_engine.py in abort(self, reason)\r\n   1009         self._exit_status = 'abort'\r\n   1010         if self.state == 'paused':\r\n-> 1011             self._resume_event_loop()\r\n   1012         return self._run_start_uids\r\n   1013 \r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/bluesky/run_engine.py in _resume_event_loop(self)\r\n    814                 return\r\n    815             try:\r\n--> 816                 self.loop.run_forever()\r\n    817             finally:\r\n    818                 if self._task.done():\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/asyncio/base_events.py in run_forever(self)\r\n    420             events._set_running_loop(self)\r\n    421             while True:\r\n--> 422                 self._run_once()\r\n    423                 if self._stopping:\r\n    424                     break\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/asyncio/base_events.py in _run_once(self)\r\n   1394                            timeout * 1e3, dt * 1e3)\r\n   1395         else:\r\n-> 1396             event_list = self._selector.select(timeout)\r\n   1397         self._process_events(event_list)\r\n   1398 \r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/selectors.py in select(self, timeout)\r\n    443             ready = []\r\n    444             try:\r\n--> 445                 fd_event_list = self._epoll.poll(timeout, max_ev)\r\n    446             except InterruptedError:\r\n    447                 return ready\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/bluesky/utils.py in handler(signum, frame)\r\n    162                 orig_func = self.original_handler\r\n    163                 self.release()\r\n--> 164                 orig_func(signum, frame)\r\n    165 \r\n    166         signal.signal(self.sig, handler)\r\n\r\nKeyboardInterrupt: \r\n\r\nIn [932]: \r\n\r\ngcdiag_y:  94%|█████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 89.0968/94.4001 [01:29<00:05,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  95%|██████████████████████████████████████████████████████████████████████████████████████████████████████▏     | 89.2739/94.4001 [01:29<00:05,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  95%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎     | 89.3834/94.4001 [01:29<00:05,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  95%|██████████████████████████████████████████████████████████████████████████████████████████████████████▌     | 89.5971/94.4001 [01:29<00:04,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  95%|██████████████████████████████████████████████████████████████████████████████████████████████████████▋     | 89.7074/94.4001 [01:29<00:04,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  95%|███████████████████████████████████████████████████████████████████████████████████████████████████████     | 90.0728/94.4001 [01:30<00:04,  1.00s/mm]\r\nIn [932]: \r\nIn [932]: \r\n\r\ngcdiag_y:  96%|███████████████████████████████████████████████████████████████████████████████████████████████████████▊    | 90.7024/94.4001 [01:30<00:03,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  96%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏   | 91.0251/94.4001 [01:31<00:03,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  97%|████████████████████████████████████████████████████████████████████████████████████████████████████████▍   | 91.2866/94.4001 [01:31<00:03,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▊   | 91.62/94.4001 [01:31<00:02,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  97%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▏  | 91.9405/94.4001 [01:32<00:02,  1.00s/mm]\r\nIn [932]: \r\nIn [932]: \r\n\r\ngcdiag_y:  98%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▋  | 92.3862/94.4001 [01:32<00:02,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 92.7628/94.4001 [01:32<00:01,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 92.9757/94.4001 [01:33<00:01,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 93.298/94.4001 [01:33<00:01,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████ | 93.6248/94.4001 [01:33<00:00,  1.00s/mm]\r\nIn [932]: \r\ngcdiag_y:  99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍| 93.8828/94.4001 [01:33<00:00,  1.00s/mm]\r\nIn [932]: \r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n\r\nIn [932]: \r\n```\r\n### this is where I hammered the `^C^ and fintally it stopped.\r\nAt this point, I was having trouble highlight the termail window text and things were a bit wierd so I was about to give up on this issue and then I found that I am stuck in running.\r\n\r\n```python\r\n\r\nIn [932]: RE.abort()\r\nAborting: running cleanup and marking exit_status as 'abort'...\r\nOut[932]: \r\n['2bcc4bfe-8aee-4a3c-aa48-ef57580e9642',\r\n '0e859145-bd5d-4ea3-8e19-d8edd857ddaf']\r\n\r\nIn [933]: %run -i ~/.ipython/profile_collection/plans/03-plan.py\r\n\r\nIn [934]: RE(my_plan_overnight())\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n~/.ipython/profile_collection/plans/03-plan.py in <module>()\r\n----> 1 RE(my_plan_overnight())\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/bluesky/run_engine.py in __call__(self, *args, **metadata_kw)\r\n    685         # If we are in the wrong state, raise.\r\n    686         if not self.state.is_idle:\r\n--> 687             raise RuntimeError(\"The RunEngine is in a %s state\" % self.state)\r\n    688 \r\n    689         futs = []\r\n\r\nRuntimeError: The RunEngine is in a running state\r\n\r\nIn [935]: RE.abort()\r\nAborting: running cleanup and marking exit_status as 'abort'...\r\nOut[935]: \r\n['2bcc4bfe-8aee-4a3c-aa48-ef57580e9642',\r\n '0e859145-bd5d-4ea3-8e19-d8edd857ddaf']\r\n\r\nIn [936]: RE(my_plan_overnight())\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n~/.ipython/profile_collection/plans/03-plan.py in <module>()\r\n----> 1 RE(my_plan_overnight())\r\n\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/bluesky/run_engine.py in __call__(self, *args, **metadata_kw)\r\n    685         # If we are in the wrong state, raise.\r\n    686         if not self.state.is_idle:\r\n--> 687             raise RuntimeError(\"The RunEngine is in a %s state\" % self.state)\r\n    688 \r\n    689         futs = []\r\n\r\nRuntimeError: The RunEngine is in a running state\r\n\r\n\r\n '0e859145-bd5d-4ea3-8e19-d8edd857ddaf']\r\n\r\nIn [939]: exit\r\nERROR:asyncio:Task was destroyed but it is pending!\r\ntask: <Task pending coro=<Event.wait() done, defined at /opt/conda_envs/collection-2018-2.0/lib/python3.6/asyncio/locks.py:269> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f2517fa5588>()]> cb=[_wait.<locals>._on_completion() at /opt/conda_envs/collection-2018-2.0/lib/python3.6/asyncio/tasks.py:380]>\r\nxf02id1@xf02id1-ws2:~$  bsui\r\nVersions of DAMA software:\r\n\r\n    - Bluesky    : v1.3.0\r\n    - Ophyd      : v1.2.0a3\r\n    - Databroker : v0.11.0\r\n\r\nLinks to Bluesky and Databroker tutorials:\r\n\r\n    - http://nsls-ii.github.io/bluesky/tutorial.html\r\n    - http://nsls-ii.github.io/databroker/tutorial.html\r\n\r\nIf you get lost or confused, then we want to know! We have a friendly chat channel:\r\n\r\n    https://gitter.im/NSLS-II/DAMA\r\n\r\nor you can file a bug to let us know where our documentation could be made more clear:\r\n\r\n    https://github.com/NSLS-II/Bug-Reports/issues\r\n\r\nbsui is running these commands now to start an interactive computing environment for data acquisition:\r\n    $ conda activate collection-2018-2.0\r\n    $ ipython --profile=collection \r\n\r\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 18:21:58) \r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 6.3.1 -- An enhanced Interactive Python. Type '?' for help.\r\n\r\nIPython profile: collection\r\nLoading metadata history from /home/xf02id1/.config/bluesky/bluesky_history.db\r\nQStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-xf02id1'\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/ophyd/utils/startup.py:11: UserWarning: This function is deprecated in ophyd 1.2 and will be removed in ophyd 1.3. setup is now automatically called.\r\n  warnings.warn(\"This function is deprecated in ophyd 1.2 \"\r\nVersions of DAMA software:\r\n\r\n    - Bluesky    : v1.3.0\r\n    - Ophyd      : v1.2.0a3\r\n    - Databroker : v0.11.0\r\n\r\nLinks to Bluesky and Databroker tutorials:\r\n\r\n    - http://nsls-ii.github.io/bluesky/tutorial.html\r\n    - http://nsls-ii.github.io/databroker/tutorial.html\r\n\r\nIf you get lost or confused, then we want to know! We have a friendly chat channel:\r\n\r\n    https://gitter.im/NSLS-II/DAMA\r\n\r\nor you can file a bug to let us know where our documentation could be made more clear:\r\n\r\n    https://github.com/NSLS-II/Bug-Reports/issues\r\n\r\nbsui is running these commands now to start an interactive computing environment for data acquisition:\r\n    $ conda activate collection-2018-2.0\r\n    $ ipython --profile=collection \r\n\r\nPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 18:21:58) \r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 6.3.1 -- An enhanced Interactive Python. Type '?' for help.\r\n\r\nIPython profile: collection\r\nLoading metadata history from /home/xf02id1/.config/bluesky/bluesky_history.db\r\nQStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-xf02id1'\r\n/opt/conda_envs/collection-2018-2.0/lib/python3.6/site-packages/ophyd/utils/startup.py:11: UserWarning: This function is deprecated in ophyd 1.2 and will be removed in ophyd 1.3. setup is now automatically called.\r\n  warnings.warn(\"This function is deprecated in ophyd 1.2 \"\r\n\r\n\r\n```\r\n\r\n## important note is that cryo.t was found at 30 after all of this.  The first point was 15, so somehow things jumped ahead..  Unfotunately, no archive data to prove it. Just the scan numbers \r\n```python\r\n [9]: db[-3]['start']['scan_id']\r\nnamespace()\r\nOut[9]: 20485\r\n```\r\nThis was the one before the plan started.\r\n\r\nThe only item i suspenders is the ring current\r\n```python\r\nIn [937]: RE.suspenders\r\nOut[937]: (SuspendFloor(EpicsSignalRO(read_pv='SR:OPS-BI{DCCT:1}I:Real-I', name='ring_curr', value=375.1611844984303, timestamp=1532224354.963782, pv_kw={}, auto_monitor=False, string=False), sleep=120, pre_plan=None, post_plan=None,tripped_message=),)\r\n\r\nIn [938]: \r\n```\r\n\r\n### Here is code for the plan:\r\n```python\r\ndef my_plan_overnight():\r\n    \r\n    thetas = [15, 30]\r\n    zs = [16.45, 17.47 ]\r\n\r\n    #xs = \r\n    yield from mv(cryo.t, thetas[0], cryo.z, zs[0] )\r\n    yield from rixscam_energies_SatNight(12, 'H' )\r\n\r\n    \r\n    yield from mv(cryo.t, thetas[1], cryo.z, zs[1] )\r\n    yield from rixscam_energies_2(12, 'H')\r\n\r\n\r\ndef rixscam_energies_SatNight(num_rixs_im, pol_type, extra_md = ' ' ):\r\n    # num_rixs_im = number of RIXS befove every beamline alignment\r\n    # the list of pitch and energy has to be updated accordingly to num_rixs_im, example a total of 24 scans with alignment every 12 scans requires to double the list\r\n    #                                 m7_pit_val = [5.42, 5.42, 5.44, 5.44]   &  Ei = [500, 500, 505, 505]\r\n    # pol_type = polarization H, or V, offset are already assumed\r\n    # extra_md = optional, note or metadata\r\n    m7_pit_val = [5.4210,5.4210, 5.4305,5.4305,5.4385, 5.4385]\r\n    Ei_val = [ 576.5,576.5, 579.3,579.3, 580.5, 580.5 ]\r\n\r\n    yield from mv(extslt.vg,30)\r\n    \r\n    if pol_type == 'H':\r\n        yield from pol_H(4)\r\n    elif pol_type == 'V':\r\n        yield from pol_V(6) \r\n    else:\r\n        print('You forgot to specify the polarization type or pol_type.')\r\n\r\n    f_string=''\r\n\r\n    print('Starting plan for {} polarized light with {} rixs images for each Ei = {}'.format(pol_type,num_rixs_im,Ei_val))\r\n    \r\n    try:\r\n        #yield from align.m1pit\r\n        #yield from m3_check() \r\n        for i in range(len(m7_pit_val)):\r\n            yield from mv(espgm.m7pit, m7_pit_val[i])\r\n            yield from mv(pgm.en, Ei_val[i])\r\n            yield from align.m1pit\r\n            yield from m3_check() \r\n            yield from mv(gvbt1,'open')\r\n            #scan_num_cor = 2+2*i\r\n            for j in range(0, num_rixs_im):\r\n                yield from mvr(cryo.y,-0.01)\r\n                uid = yield from count([rixscam],num=1, md = {'reason':'Sr2CrO4 - E = {} eV - Pol {}'. format(Ei_val[i],pol_type)}) \r\n                if uid == None:\r\n                    uid = db[-1].start['scan_id']#+1+j+scan_num_cor\r\n                    f_string += 'scan no ' + str(uid) + ': E = ' + str(Ei_val[i]) + '\\n'\r\n                else:\r\n                    f_string += 'scan no ' + str(db[uid].start['scan_id']) + ': E = ' + str(Ei_val[i]) + '\\n'\r\n            yield from mv(gvbt1,'close')\r\n            #yield from align.m1pit\r\n            #yield from m3_check() \r\n         \r\n\r\n        yield from mv(gvbt1,'open')\r\n        yield from mv(gvsc1,'close')\r\n        for i in range(0,3):\r\n            uid = yield from count([rixscam],num=1, md = {'reason':'gv:sc1 dark'})        \r\n            if uid == None:\r\n               uid = -1\r\n            f_string += 'scan no ' + str(db[uid].start['scan_id']) + ':  dark \\n'\r\n        yield from mv(gvbt1,'close')\r\n        yield from mv(gvsc1,'open')\r\n    \r\n        print (f_string) \r\n\r\n    except Exception:\r\n        yield from mv(gvbt1,'close')\r\n        yield from mv(gvsc1,'open')\t\r\n        print('OOPS!  The plan stopped.  The completed scans are:\\n')\r\n        print(f_string)\r\n\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/NSLS-II/bluesky/issues/comments/415221858","html_url":"https://github.com/NSLS-II/bluesky/issues/1072#issuecomment-415221858","issue_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/1072","id":415221858,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTIyMTg1OA==","user":{"login":"tacaswell","id":199813,"node_id":"MDQ6VXNlcjE5OTgxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/199813?v=4","gravatar_id":"","url":"https://api.github.com/users/tacaswell","html_url":"https://github.com/tacaswell","followers_url":"https://api.github.com/users/tacaswell/followers","following_url":"https://api.github.com/users/tacaswell/following{/other_user}","gists_url":"https://api.github.com/users/tacaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/tacaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacaswell/subscriptions","organizations_url":"https://api.github.com/users/tacaswell/orgs","repos_url":"https://api.github.com/users/tacaswell/repos","events_url":"https://api.github.com/users/tacaswell/events{/privacy}","received_events_url":"https://api.github.com/users/tacaswell/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T23:36:00Z","updated_at":"2018-08-22T23:36:00Z","author_association":"MEMBER","body":"@ambarb TLDR: add `raise` on its own line in your except blocks as\r\n\r\n```python\r\n\r\ntry:\r\n    ...\r\nexcept Exception:\r\n    ...\r\n    raise\r\n```\r\n\r\n@danielballan We probably need to document that if a `GeneratorExit` exception is thrown in your plan _must_ drop dead (this is a python language thing https://www.python.org/dev/peps/pep-0342/#new-standard-exception-generatorexit or https://amir.rachum.com/blog/2017/03/03/generator-cleanup/) which is something the wrappers take care of for you.  However, that is not the problem here.\r\n\r\nThe issue is that in your `execpt` block you are not re-raising the exception!  What is happening is your first call to `rixscam_energies_SatNight` is getting the exception thrown it, it then handles it and from the point of view of the outside world everything is good to continue! So the outer plan continues on to the second call to `rixscam_energies_SatNight`.  However because this was done in the context of an `abort` we have already started to tear down the internal state of the RE so (apparently) the ctrl-C handling is not working.  \r\n\r\nAt this point I must paraphrase Tolstoy \"All happy code paths are alie; every unhappy code path is unhappy in its own way\" and in the ctrl-c panic induced state restarting (as you did) is the best bet).\r\n\r\nYou have probably exposed 2 bugs in the RE\r\n\r\n 1) things are not quite right in the abort path\r\n 2) the panic path leaves the RE un-useable (but we mostly knew that)"}}
{"actor":{"display_login":"tacaswell"}}