stata_kernel icon indicating copy to clipboard operation
stata_kernel copied to clipboard

Opening stata kernel in notebooks closes existing stata

Open jeremysze opened this issue 7 years ago • 4 comments

Problem description

Hi

Everytime I open a stata kernel notebook while having an existing Stata and dofile open and running. It closes the Stata window. I'm not sure why that is the case, as I did not find others complaining about the issue. I followed the instructions on your page to install stata kernel.

Other information

If you didn't attach the debugging log, please provide:

  • Windows 10
  • Stata 15.1
  • stata-kernel 1.5.9

jeremysze avatar Nov 28 '18 17:11 jeremysze

Yes, this is known behavior. The issue is that I don't get to choose which Stata session I connect to. By default, it connects to the earliest opened Stata session, or it creates one if it doesn't exist. Then it hides the Stata GUI. The options are:

  • The existing behavior
  • I can set it so that stata_kernel always opens a new Stata GUI window, but then whenever the newly created Stata session closes, any Stata windows that had been opened previously are also closed. I don't know of a way around that.

kylebarron avatar Nov 28 '18 20:11 kylebarron

Thanks! I think I will just have to keep these issues in mind. Stata kernel has been awesome for sharing work!

jeremysze avatar Nov 28 '18 20:11 jeremysze

With the next release, with https://github.com/kylebarron/stata_kernel/pull/251, you'll be able to use %show_gui to bring up your preexisting Stata session that got hidden.

kylebarron avatar Nov 28 '18 20:11 kylebarron

I just pushed a new release to PyPI, so the %show_gui magic is enabled now.

kylebarron avatar Nov 28 '18 21:11 kylebarron