-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphs no longer display in Jupyter notebook #428
Comments
Reporting the same issue, although I had never had it work on this specific system.
|
I also had this problem (in my case on Linux), but in my case I had a tarball of Stata 16 still lying around, so after testing with both versions it appears that whatever the problem is, it was introduced with Stata 17. Using Stata 16 as the kernel produces inline graphs exactly as expected. Debug logs from both versions enclosed for comparison purposes: |
I'm also unable to view graphs in Jupyter notebooks nor Atom via Hydrogen while using Stata 17. It looks like there was a similar issue in #394, but I can't tell if it was ever successfully resolved based on the comments. |
Stata 17 have introduced a number of changes that breaks compatibility with stata_kernel. Having tried in vain to solve the issues, I ended up combining features from stata_kernel and Stata 17's official pystata package into pystata-kernel. Works mostly just like stata_kernel, but specifically for Stata 17. |
It seems to be fixed, but somehow not merged into the master branch? |
I am using
Mac m1 max apple sillicon, STATA17, even if I do `pip install git+https://github.com/mcaceresb/stata_kernel.git@dev-stata17-graph-fix, it does not fix. Grahps no longer display in my Jupyter notebook. |
Have you tried pystata_kernel? Or https://github.com/hugetim/nbstata, which I think is now at least feature-equivalent to stata_kernel. |
Hi Tim, I hope you're doing well. I wanted to thank you for suggesting the use of pystata_kernel. Unfortunately, I encountered some issues while trying to execute "pystata" on my Apple Silicon Mac. The installing is fine but I cannot "stata_setup.config('STATA_SYSDIR', 'mp', splash=False)". I searched STATA forum for the issue and It seems that STATA Corp has not updated "pystata" properly, and some JAVA-related issues are causing problems. I was really looking forward to using pystata_kernel, especially because it supports syntax highlighting. Currently, I am using stata_kernel with Visual Studio Code for my STATA-related tasks, and most of the functionalities are working well, except for displaying graphs. However, one major inconvenience is the lack of syntax highlighting in Visual Studio Code. Thank you again for your suggestion, and I hope I can find a solution to enhance my STATA workflow soon... |
Just reporting that I had this exact issue when upgrading to Stata 17 then 18. As with @harningle, I was also able to get everything working using py -m pip install git+https://github.com/mcaceresb/stata_kernel.git@dev-stata17-graph-fix. In case it's helpful for anyone who finds this, although it looked as though changes had been merged, neither 12.2 from PyPi nor the main branch 12.3 worked for me (and actually broke a bunch of stuff in jupyter). I am running generic python 3.12 not Anaconda, Windows 11, StataMP 18. |
Problem description
I've been using stata_kernel for a while to run Stata code in a Jupyter notebook, though with long gaps as I only use Stata from time to time. Now is one of those times and I've noticed that graphs no longer display in my notebook window. Note that I've tried all the advice out there about using different output formats, and I've also tried setting execution_mode to both console and automation (in the latter case I see the graph fine in Stata itself) , but nothing helps.
This should explain why the current behavior is a problem and why the expected output is a better solution.
Note: Many problems can be resolved by simply upgrading
stata_kernel
to the latest version. Before submitting, please try:and check if your issue is fixed.
Debugging log
If possible, attach the text file located at
where
$HOME
is your home directory. This will help us debug your problem quicker.NOTE: This file includes a history of your session. If you work with restricted data, do not include this file.
Code Sample
Especially if you cannot attach the debugging log, please include a minimal, complete, and verifiable example.
Run this in a cell in a Jupyter notebook:
Expected Output
A histogram
Other information
If you didn't attach the debugging log, please provide:
pip show stata_kernel
in your terminal.)The text was updated successfully, but these errors were encountered: