Skip to content
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

Open
rhstanton opened this issue Jun 21, 2022 · 9 comments
Open

Graphs no longer display in Jupyter notebook #428

rhstanton opened this issue Jun 21, 2022 · 9 comments

Comments

@rhstanton
Copy link

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:

    pip install stata_kernel --upgrade
    

    and check if your issue is fixed.

Debugging log

If possible, attach the text file located at

$HOME/.stata_kernel_cache/console_debug.log

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.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  stata_kernel_log
       log:  /Users/stanton/.stata_kernel_cache/log0.log
  log type:  text
 opened on:  21 Jun 2022, 11:56:06
adopath + `"/Users/stanton/anaconda3/lib/python3.9/site-packages/stata_kernel/ado"'
  [1]  (BASE)      "/Applications/Stata/ado/base/"
  [2]  (SITE)      "/Applications/Stata/ado/site/"
  [3]              "."
  [4]  (PERSONAL)  "/Users/stanton/Documents/Stata/ado/personal/"
  [5]  (PLUS)      "/Users/stanton/Library/Application Support/Stata/ado/plus/"
  [6]  (OLDPLACE)  "~/ado/"
  [7]              "/Users/stanton/anaconda3/lib/python3.9/site-packages/stata_kernel/ado"

. cd `"/Users/stanton/scratch"'
/Users/stanton/scratch

. set more on

. set pagesize 100

. set linesize 80

. clear all

. global stata_kernel_graph_counter = 0

. 
. di "$S_DATE, $S_TIME"
21 Jun 2022, 11:56:06

. di "Stata version: `c(version)'"
Stata version: 17

. di "OS: $S_OS"
OS: MacOSX

. `finished_init_cmd'
. di "`c(stata_version)'"
17

. `done'
. _StataKernelCompletions
%mata%

      # bytes   type                        name and extent
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
%varlist%

%globals%
stata_kernel_graph_counter S_ADO S_level F1 F2 F7 F8 S_StataMP S_StataSE S_FLAVO
> R S_OS S_OSDTL S_MACH
%logfiles%
%scalars%

%programs%
  ado      792  _StataKernelCompletions
  ado      242  clear.clearreturn
  ado      603  clear._clear_9
  ado     1915  clear
      --------
          3552

%matrices%


. `bcc4869c9c119320f7af8a3981776720'
. mata : invtokens(st_dir("local", "macro", "*")')
  

. `08a286cef0dc100f5df674f2b5353f29'
. include "/Users/stanton/.stata_kernel_cache/include.do"

. cap di "Set _rc to 0 initially"

. . `84d89c91cc0aa7dd2bfc40d61af9e55b'
. include "/Users/stanton/.stata_kernel_cache/include.do"

. webuse auto
(1978 automobile data)

. cap noi hist weight
(bin=8, start=1760, width=385)

. if _rc == 0 {
.     noi gr export `"/Users/stanton/.stata_kernel_cache/graph$stata_kernel_grap
> h_counter.svg"', width(600) replace
file /Users/stanton/.stata_kernel_cache/graph0.svg saved as SVG format
.     noi gr export `"/Users/stanton/.stata_kernel_cache/graph$stata_kernel_grap
> h_counter.pdf"', replace
file /Users/stanton/.stata_kernel_cache/graph0.pdf saved as PDF format
.     global stata_kernel_graph_counter = $stata_kernel_graph_counter + 1
. }            

. . `527f48971110bfb6ddfdf16261180b8a'
. include "/Users/stanton/.stata_kernel_cache/include.do"

. tempname __user_rc

. local `__user_rc' = _rc

. . `cc64df03024327541235dabb93f09e00'
. _StataKernelLog off

. `25222c9f47f7fdc660ba522f7a53d380'
. di `c(linesize)'
80

. `83b14c3154752dfbf1b0322b89ffcf55'
. pwd
/Users/stanton/scratch

. `9003d1df22eb4d3820015070385194c8'
. _StataKernelCompletions
%mata%

      # bytes   type                        name and extent
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
%varlist%
make price mpg rep78 headroom trunk weight length turn displacement gear_ratio f
> oreign
%globals%
stata_kernel_graph_counter T_gm_fix_span S_ADO S_level F1 F2 F7 F8 S_StataMP S_S
> tataSE S_FLAVOR S_OS S_OSDTL S_MACH
%logfiles%
%scalars%

%programs%
  ado     1271  _StataKernelLog
  ado      556  gr_export.Suffix
  ado      537  gr_export.VerifySuffix
  ado      575  gr_export.OpSysCheck
  ado      393  gr_export.GenericClass
  ado      681  gr_export.GetOpts_pdf
  ado     1566  gr_export.GetOpts_jpg
  ado     1145  gr_export.GetOpts_gif
  ado     1145  gr_export.GetOpts_tif
  ado     1145  gr_export.GetOpts_png
  ado      347  gr_export.GetOpts_mf
  ado      857  gr_export.GetOpts_svg
  ado      661  gr_export.GetOpts_eps
  ado      785  gr_export.GetOpts_ps
  ado      984  gr_export
  ado      247  gr
  ado      526  _gs_addgrname
class      405  line_g.BrowserName
class      316  line_g.DragSetup
class      473  line_g.DragBy
class      481  line_g.DragTo
class      352  line_g.DragPoint
class     2146  line_g._at_line
class     1842  line_g._at_end
class      564  line_g.at_pos
class      358  line_g.AtClickedPos
class      450  line_g.draw
class      714  line_g.new
class      270  line_g
  ado      384  _fr_draw_rect._draw_rect
  ado      776  _fr_draw_rect
  ado     1019  yxview_rbar_draw
  ado      842  colormult_nw
  ado      614  _fr_merged_implicit
  ado      848  _gs_parse_and_log_axtitle
class      408  y2xkey_g.draw_rcapsym
class      578  y2xkey_g.draw_rcap
class      278  y2xkey_g.draw_rconnected
class      271  y2xkey_g.draw_rscatter
class      273  y2xkey_g.draw_rline
class      267  y2xkey_g.draw_rarea
class      267  y2xkey_g.draw_rbar
class      269  y2xkey_g.draw_rspike
class      273  y2xkey_g
class      351  yxkey_g.DragBy
class      401  yxkey_g.dialog
class      492  yxkey_g._sym_y
class      491  yxkey_g._sym_x
class      266  yxkey_g.draw_area
class      340  yxkey_g.draw_dot
class      581  yxkey_g.draw_pie
class      427  yxkey_g._draw_pat_rect
class      637  yxkey_g.draw_bar
class      376  yxkey_g.draw_dropline
class      322  yxkey_g.draw_spike
class      582  yxkey_g.draw_symbol
class      369  yxkey_g.draw_connected
class      643  yxkey_g.draw_line
class      349  yxkey_g.draw_scatter
class      721  yxkey_g.realdraw
class      363  yxkey_g.draw
class      475  yxkey_g.ysize
class      475  yxkey_g.xsize
class      527  yxkey_g.extent
class      345  yxkey_g.is_scatter
class      298  yxkey_g.set_yxsize_dotsize
class      806  yxkey_g.set
class      651  yxkey_g.new
class      271  yxkey_g
class      717  legend_g.Edit
class      461  legend_g._super_draw
class      367  legend_g.draw
class      340  legend_g.ysize
class      340  legend_g.xsize
class      594  legend_g.parse_and_log_titles_edits
class      719  legend_g.parse_and_log_titles
class      450  legend_g.clear
class      849  legend_g._try_align
class     1137  legend_g.parse_order
class      446  legend_g.recapture_styles
class      383  legend_g.distribute_styles
class     1354  legend_g.PlaceTextKeyStackedCol
class     1354  legend_g.PlaceKeyTextStackedCol
class     1324  legend_g.PlaceTextKeyStackedRow
class     1337  legend_g.PlaceKeyTextStackedRow
class     1310  legend_g.PlaceTextKeyAdjCol
class     1308  legend_g.PlaceKeyTextAdjCol
class     1230  legend_g.PlaceTextKeyAdjRow
class     1345  legend_g.PlaceKeyTextAdjRow
class     1653  legend_g.repositionkeys
class     1942  legend_g.rebuild
class      938  legend_g.rmkey
class      907  legend_g.addkey
class      608  legend_g.new
class      272  legend_g
class      419  spacer.draw
class      435  spacer.set
class      311  spacer.new
class      270  spacer
class      386  legendstyle.new
class      275  legendstyle
  ado      569  _fr_title_parse_and_log.PosMap
  ado     4134  _fr_title_parse_and_log
  ado      663  _fr_legend_parse_and_log.ParseLogLabel
  ado     3756  _fr_legend_parse_and_log.ParseLogOpts
  ado      569  _fr_legend_parse_and_log.PosMap
  ado     3406  _fr_legend_parse_and_log
class      670  y2xview_g._dialog
class     2383  y2xview_g.gedi_extent
class      417  y2xview_g._at_rpoints
class      365  y2xview_g._at_pos_rcap
class      472  y2xview_g._at_pos_rcapsym
class     1186  y2xview_g._at_pos_rbarm
class     1309  y2xview_g._at_pos_rbar
class      755  y2xview_g._at_pos_rspike_wrk
class      370  y2xview_g._at_pos_rspike
class      581  y2xview_g._at_pos_rconnected
class      764  y2xview_g._at_rarea
class      489  y2xview_g._at_pos_rarea
class      563  y2xview_g._at_pos_rline
class      344  y2xview_g._at_pos_rscatter
class      944  y2xview_g.dimtitle
class      354  y2xview_g.newkey
class      872  y2xview_g.ranges
class      304  y2xview_g.Y2
class      614  y2xview_g.set
class      273  y2xview_g
class      441  yxview._dialog
class      514  yxview.dialog
class     2431  yxview.gedi_extent
class      336  yxview._maybe_override_type
class      453  yxview.SortOnX
class      745  yxview.SelectedCustomIndex
class      427  yxview.SetType
class      301  yxview.SetCustomLabel
class      713  yxview.SetCustom
class      375  yxview.EditCustomLabel
class      896  yxview.EditCustomStyle
class      722  yxview.SetRightMenu
class      594  yxview._run_ksm_lowess
class      590  yxview._run_ksm_line
class      585  yxview._run_ksm_mean
class     1192  yxview._add_regression
class      419  yxview._run_fractional_polynomial
class      713  yxview._run_quadratic_regression
class      624  yxview._run_regression_line
class     4571  yxview._at_labels
class     1403  yxview.at__barlike
class      673  yxview._at_area
class      923  yxview._at_lines
class      813  yxview._at_points
class      402  yxview._xscale_trans_func
class      402  yxview._yscale_trans_func
class      324  yxview._xscale_trans_code
class      324  yxview._yscale_trans_code
class      550  yxview._scale_trans_code
class      853  yxview._at_markers
class      412  yxview._at_pos_dot
class      457  yxview._at_pos_dropline
class     1186  yxview._at_spike_wrk
class      284  yxview._at_pos_spike
class     1093  yxview._at_bar_wrk
class      284  yxview._at_pos_bar
class      488  yxview._at_pos_area
class      450  yxview._at_pos_connected
class      435  yxview._at_pos_line
class      284  yxview._at_pos_scatter
class      430  yxview.at_pos
class      760  yxview._run_derived
class      763  yxview._last_xyandplotreg
class     1119  yxview._set_addview
class     1653  yxview._set_type
class      307  yxview.next_default_series
class      536  yxview.register_with_scale
class      651  yxview.minmax_range
class      305  yxview.max_range
class      305  yxview.min_range
class     1014  yxview._draw_weighted_points
class     1931  yxview._draw_point
class      794  yxview.SetGlobalLabelJ
class      695  yxview._get_label
class     3116  yxview._draw_labeled_points
class      517  yxview._draw_line
class     1696  yxview._draw_points
class      311  yxview.yxview_connected_draw
class      292  yxview.yxview_line_draw
class      266  yxview.yxview_scatter_draw
class      434  yxview.draw
class      358  yxview.label
class      405  yxview.newkey
class      452  yxview.dim_value_label_series
class      517  yxview.dimformat
class      646  yxview.dimtitle
class      800  yxview.ranges
class      303  yxview.Y
class      303  yxview.X
class     1201  yxview.set
class      395  yxview.new
class      270  yxview
class      434  yxbartype_g._unabbrev
class      275  yxbartype_g
class      275  xyaddviews.new
class      274  xyaddviews
class      275  seriesstyle
class      380  connectstyle.onlines_code
class      859  connectstyle._unabbrev
class      276  connectstyle
class      284  labelstyle.setgdifull
class      629  labelstyle.vertical_setting
class      713  labelstyle.horizontal_setting
class      462  labelstyle.setgdi
class      647  labelstyle.set
class      371  labelstyle.new
class      274  labelstyle
class      304  markerstyle.setgdifull
class     1197  markerstyle.setgdi
class      437  markerstyle.drawn
class      644  markerstyle.set
class      362  markerstyle.new
class      275  markerstyle
class      274  symbolsize
class     2244  symbol._unabbrev
class      288  symbol.setsymbol
class      270  symbol
class      432  yxtype._unabbrev
class      270  yxtype
class      429  y2xtype._unabbrev
class      271  y2xtype
class      349  plotregion.ZeroPlaybackCounts
class     1287  plotregion.add_log_refline
class      365  plotregion.add_browser_objects
class      327  plotregion.ScaleTransforms
class      593  plotregion._log_shift
class     1149  plotregion.LocalShift
class      614  plotregion.LocalPosition
class      260  plotregion._size_w_margin
class      885  plotregion.ClickPosInNaturalMetric
class     2323  plotregion._add_selected_views
class     1447  plotregion.views_at_pos
class      822  plotregion.move_view
class      734  plotregion.list_ofclass
class      720  plotregion.dimformat
class      742  plotregion.dimtitle_mquoted
class      294  plotregion.dimtitle_quoted
class      678  plotregion.dimtitle_clean
class      671  plotregion.dimtitle_safe
class     1489  plotregion.dimtitle
class      482  plotregion.ysize
class      482  plotregion.xsize
class      569  plotregion._set_autosquare
class      313  plotregion.reset_gdi
class     1922  plotregion.real_draw
class      414  plotregion._sized_draw
class      413  plotregion.draw
class      398  plotregion.clear_scales
class      621  plotregion._set_scales
class      737  plotregion.reset_scales
class      343  plotregion.addaxis
class      324  plotregion.get_time_format
class      295  plotregion.declare_xyline
class      362  plotregion.DeclareInArray
class      265  plotregion.insert
class      453  plotregion.set
class      313  plotregion.new
class      274  plotregion
class     1001  cell._set_span
class     1248  cell._prse_set_span
class      268  cell
class      416  series.readfromfile
class     1005  series.savetofile
class      324  series.reset_partial
class      398  series.reset_derived
class      363  series.label_or_name
class      577  series.seton
class      299  series.has_labels
class      515  series.vlab_pos_of
class      656  series.value_code
class      466  series.value_label
class      419  series.Labdex
class      382  series.set_a_label
class      432  series.set_labels
class     1129  series.new
class      270  series
 mata      836  series._series_save_labels()
class      271  vartype
class      900  serset.readfromfile
class      973  serset.savetofile
class      302  serset._clear_sers
class      757  serset.as_spline
class      793  serset.as_median_bands
class      417  serset.at_polyarea
class      410  serset.at_rarea
class      393  serset.at_area
class      505  serset.at_pclines
class      418  serset.at_lines
class      462  serset.at_points
class      313  serset._set_sortorder
class     1231  serset.sort
class      458  serset.numvalue
class      795  serset.value
class      323  serset.set_labels
class      369  serset.varlist
class      283  serset.nameof
class      401  serset.seriesof
class      416  serset.seton
class      292  serset.set
class      490  serset._genwt
class     1627  serset.new
class      332  serset.destructor
class      270  serset
  ado      387  _crcslbl
  ado      316  _fr_runlog.LogMapping
  ado      967  _fr_runlog
  ado      845  label
  ado      597  _clsarr2list
class      272  ordstyle
  ado     1278  classutil.DisplayInCols
  ado      999  classutil.DirSearch
  ado     1150  classutil.Cdir
  ado      359  classutil.NotFoundMsg
  ado      389  classutil.NotClass
  ado      385  classutil.TopLevel
  ado      390  classutil.Found
  ado      654  classutil.GetObjectName
  ado      621  classutil.GetClassName
  ado     1244  classutil.Which
  ado     1274  classutil.Dir
  ado      571  classutil.DescribeClass_u
  ado     2013  classutil.DescribeClass
  ado      402  classutil.DescribeClassI_u
  ado     1838  classutil.DescribeClassInstance
  ado     1221  classutil.DisplayObjectLine
  ado     1666  classutil.Describe
  ado      754  classutil.Drop
  ado      656  classutil
  ado      266  cutil
  ado     2607  _fr_area_parse_and_log._fr_area_parse_and_log_once
  ado      593  _fr_area_parse_and_log
class      372  twowaygraph_g.n_xaxes
class      372  twowaygraph_g.n_yaxes
class      316  twowaygraph_g.next_default_series
class      582  twowaygraph_g._unab_cmd
class     3579  twowaygraph_g.create_axes
class     2380  twowaygraph_g._parse_log_1textbox
class      658  twowaygraph_g.ParseAndLogText
class      716  twowaygraph_g.SetCheckPlotregion
class     1168  twowaygraph_g.ParseOpts
class    10789  twowaygraph_g.parse
class      263  twowaygraph_g.addplots
class      433  twowaygraph_g.new
class      277  twowaygraph_g
class      631  graph_g._gdi2pixel
class      264  graph_g.TextboxDialogDone
class      987  graph_g._maybe_fixup_cmd
class      478  graph_g._throw_note
class     1389  graph_g.RecorderPlay
class      984  graph_g.RecorderEnd
class     1248  graph_g._unlock_recurse
class      295  graph_g.UnlockAll
class     2286  graph_g._set_grid_lines
class      433  graph_g.ResetPrototypeDefaults
class     2252  graph_g.AddMarkerInContainer
class     1723  graph_g.AddLineInContainer
class     1549  graph_g.AddBlankTextbox
class      389  graph_g.BrowserOpen
class      641  graph_g.RescaleClick
class      341  graph_g.Dimensions
class      763  graph_g.UndoEnd
class      316  graph_g.UndoBegin
class      605  graph_g.SetUndoRedoMenus
class     1051  graph_g.ModeChange
class     2659  graph_g.ButtonUp
class      384  graph_g.DoubleClick
class      647  graph_g.ClearSelection
class      385  graph_g.SelectNewObject
class      387  graph_g.SelectObject
class      527  graph_g.BrowserSelect
class     5606  graph_g.SetRightMenu
class      596  graph_g.RightClick
class     1962  graph_g.LeftClick
class      463  graph_g.ClearEditor
class      563  graph_g.OpenEditor
class      383  graph_g.get_axis_title_styleref
class      379  graph_g.get_axis_title
class      715  graph_g.reinsert_axis
class      871  graph_g.alt_axis
class      922  graph_g.list_axes
class      702  graph_g._setstyle_xyz_ring
class      753  graph_g._setstyle_xyz_position
class      280  graph_g._setstyle_note_ring
class      283  graph_g._setstyle_caption_ring
class      284  graph_g._setstyle_subtitle_ring
class      281  graph_g._setstyle_title_ring
class      284  graph_g._setstyle_note_position
class      287  graph_g._setstyle_caption_position
class      288  graph_g._setstyle_subtitle_position
class      285  graph_g._setstyle_title_position
class      568  graph_g.record_header
class      267  graph_g.runlog
class      272  graph_g.graphdb
class     1673  graph_g._parse_log_1textbox
class      704  graph_g.ParseAndLogText
class      373  graph_g._axisnum
class     2568  graph_g.ParseAndLogAxes
class     1638  graph_g.maketitles
class      427  graph_g.graphvars
class      337  graph_g.drawgraph_noposition
class     1690  graph_g._set_yaxis_overhangs
class     1855  graph_g._set_xaxis_overhangs
class      579  graph_g._draw_and_set_overhangs
class      363  graph_g._has_spacers
class      397  graph_g._use_aspect_ratio
class      743  graph_g.SetAspectRatio
class     1745  graph_g._setup_aspect_ratio
class      582  graph_g._reinit_stretches
class      574  graph_g._reset_for_aspect
class      632  graph_g._hold_for_aspect
class      481  graph_g._draw_and_set_aspect
class      779  graph_g.draw
class      362  graph_g._drawn_view
class     1114  graph_g._browser_append
class     1324  graph_g._append_views_recurse
class     1000  graph_g._append_to_view_browser
class      364  graph_g._set_view_browser
class      992  graph_g._set_gedi_properties
class      740  graph_g._set_cts_toolbar
class      819  graph_g._set_browser_selected
class      321  graph_g._set_edit_and_hold
class      767  graph_g._set_views_to_containers
class     2522  graph_g._set_edit_object
class     1593  graph_g.drawgraph
class      527  graph_g.set_spacers_fixed
class      920  graph_g.parse_and_log_spacers
class     1154  graph_g.parse_and_log_titles_edits
class     1234  graph_g.parse_and_log_titles
class      440  graph_g.set_axis_plotregion
class      442  graph_g.set_scale
class      343  graph_g._map_sersets
class      466  graph_g.log_cmd
class     2872  graph_g.parse_sersets
class      453  graph_g.new
class      271  graph_g
 mata      284  graph_g._gred_replace_basename()
 mata      536  graph_g._gred_replace_dex()
 mata      412  graph_g._gred_index_of()
 mata      380  graph_g._gred_container_of()
class      276  grid.dialog
class      831  grid.ZeroPlaybackCounts
class      327  grid.BrowserName
class     1181  grid.Expand
class      955  grid.Contract
class      351  grid.DragBy
class      407  grid.DragTo
class     2425  grid.GridDrag
class      775  grid.LocalClicked
class      653  grid.LocalShift
class      753  grid.LocalPositionOf
class      684  grid.LocalPosition
class     1379  grid._add_selected_views
class      519  grid.minrow_oflist_incol
class      518  grid.maxrow_oflist_incol
class      519  grid.mincol_oflist_inrow
class      518  grid.maxcol_oflist_inrow
class      371  grid.maxxposof
class      371  grid.maxyposof
class      369  grid.minxposof
class      369  grid.minyposof
class      407  grid.maxcol_oflist
class      408  grid.mincol_oflist
class      407  grid.maxrow_oflist
class      408  grid.minrow_oflist
class      322  grid.maxcolof
class      322  grid.maxrowof
class      322  grid.mincolof
class      322  grid.minrowof
class      350  grid.in_col
class      350  grid.in_row
class      623  grid.numgriddragable
class      617  grid.numobjects
class      668  grid.list_ofclass_indices
class      752  grid.list_ofclass
class      764  grid.list_ofclassname
class      535  grid._set_fixed_dimsize
class      278  grid._set_fixed_ysize
class      278  grid._set_fixed_xsize
class      744  grid.scale_gmetric
class      434  grid._rev_row_pos
class      468  grid._posn_from_size
class      470  grid._shr_only_ct
class      693  grid._sum_fixed
class     2239  grid._set_sizes
class     1922  grid._spread_fixed
class     1228  grid._update_pos
class     1137  grid._pos_dim
class      323  grid.position
class      775  grid._align_click_shift
class      901  grid._align
class     1177  grid._draw_cell
class      268  grid.draw_cell
class      585  grid.draw_cells
class      470  grid.draw_setup2
class      782  grid._set_rensize
class     1059  grid.draw_setup1
class      341  grid.draw
class      737  grid._insert_plview
class     1290  grid.place_views
class      840  grid._adj_span
class      665  grid._do_fixed
class     1252  grid._fixed_sz
class      384  grid.ysize
class      384  grid.xsize
class      516  grid.clear_notnamed
class      341  grid.clear_ofclass
class      360  grid.clear_all_views
class      466  grid.delete
class      471  grid._fitgaps_show
class      330  grid._clear_fitgaps
class      555  grid._fitgaps_goright
class      533  grid._fitgaps_goleft
class      533  grid._fitgaps_gobelow
class      555  grid._fitgaps_goabove
class      592  grid._fitgaps_check_n_blot
class      512  grid._fitgaps_blot
class      455  grid._set_cell_gap
class      927  grid._set_fitgaps
class      699  grid._fill_fitgaps
class      297  grid._declare_view
class      645  grid._move_view
class      800  grid._add_view
class      944  grid._find_ringcol
class     1000  grid._find_ringrow
class      495  grid._set_direction
class     4213  grid.insert
class      601  grid.move
class      684  grid.new
class      268  grid
class      361  container.set_transforms
class      343  container.get_transforms
class      347  container.reset_gu_scaling
class      278  container.get_gu_scaling
class      565  container.set_gu_scaling
class      362  container.DeclareInArray
class      312  container.new
class      273  container
class      313  _gm_undo._clear_i
class      270  _gm_undo._clear_nxt
class      310  _gm_undo._update_nxt
class      688  _gm_undo.debug
class      294  _gm_undo.any_undos
class      471  _gm_undo.RedoTitle
class      294  _gm_undo.UndoTitle
class      301  _gm_undo.clear
class      627  _gm_undo.collapse_redos
class      614  _gm_undo.redo
class     1057  _gm_undo.undo
class      899  _gm_undo.set_title
class      393  _gm_undo.end_set
class      286  _gm_undo.begin_set
class      906  _gm_undo.add
class      273  _gm_undo
class      311  stretch_g.setting
class      318  stretch_g.new
class      273  stretch_g
class      274  graphstyle
class      376  plotregionstyle.set
class      261  plotregionstyle.new
class      279  plotregionstyle
class      480  vertical.shift_factor
class      272  vertical
class      695  areastyle.draw
class      383  areastyle.setlineasareafull
class      304  areastyle.setlinestylefull
class      277  areastyle.setlinestyle
class      319  areastyle.setgdifull
class      301  areastyle.setgdi
class      348  areastyle.patterned_line
class      419  areastyle.is_drawn
class      435  areastyle.set
class      261  areastyle.new
class      273  areastyle
class      286  shadestyle.setgdipenfull
class      607  shadestyle.setgdipen
class      281  shadestyle.setgdifull
class      647  shadestyle.setgdi
class      572  shadestyle.set
class      359  shadestyle.new
class      274  shadestyle
class      275  fillpattern
class      273  intensity
class      438  gridringstyle._unabbrev
class      277  gridringstyle
class      668  clockdir._unabbrev
class      300  clockdir.westofcenter
class      299  clockdir.eastofcenter
class      341  clockdir.northofcenter
class      299  clockdir.southofcenter
class      299  clockdir.issouth
class      319  clockdir.isnorth
class      300  clockdir.iswest
class      299  clockdir.iseast
class      441  clockdir.vertical_style
class      442  clockdir.horizontal_style
class      348  clockdir.compass2style
class      478  clockdir.relative_pos
class      477  clockdir.relative_position
class      375  clockdir.angle
class      272  clockdir
class      915  graphsize.setstyle
class      273  graphsize
class      573  axis.Selected
class      917  axis.SetRightMenu
class      322  axis._add_selected_views
class     2231  axis.views_at_pos
class      383  axis.reset_rule
class      383  axis.edit_tick
class      401  axis.add_ticks
class      298  axis.browser_objects
class      576  axis.get_time_format
class     1053  axis.daterange
class      374  axis.addmax
class      374  axis.addmin
class      289  axis._set_minornl
class      289  axis._set_majornl_max
class      287  axis._set_major_max
class      289  axis._set_minornl_min
class      289  axis._set_majornl_min
class      287  axis._set_minor_min
class      287  axis._set_major_min
class      326  axis.set_alltickstyles
class      315  axis.set_allticksets
class      381  axis.set_draw_off_fill
class      725  axis.set_ticks_onoff
class      515  axis.set_labels_onoff
class      467  axis.set_ticks_off
class      471  axis.set_labels_off
class      335  axis._value_label_series
class      328  axis._declare_array
class      407  axis._cleanup_created
class      408  axis._drawem2
class      507  axis._drawem
class     1422  axis.draw2
class      422  axis._draw_title
class     4214  axis.real_draw
class      414  axis._sized_draw
class      612  axis.draw
class      332  axis.clear_ticks
class      371  axis.set_userules
class      529  axis.convert_gu_to_scale
class      345  axis.matching_label_position
class      358  axis.matching_label_editstyle
class      440  axis.matching_label_size
class      480  axis.major_label_overhangs
class      537  axis._tick_and_label_width
class      384  axis.ysize_notitle
class      382  axis.xsize_notitle
class      668  axis.ysize
class      662  axis.xsize
class      615  axis.set_plotregion
class      454  axis.set_transform
class      509  axis.set_scales
class      627  axis.set_formats
class      409  axis.specifiedmax
class      408  axis.specifiedmin
class      407  axis.overallmax
class      406  axis.overallmin
class      379  axis.reset_scale
class      266  axis._set_ticks
class      827  axis.set_ticks
class      397  axis.set_reverse
class      395  axis.set_trans
class      394  axis.set_pow2
class     1459  axis.set
class      628  axis.new
class      268  axis
class      279  transform.to_gdi_size
class      290  transform.to_gdi_pos
class      606  transform.trans
class      428  transform.rescale
class      401  transform.reset
class      450  transform.translate_permanent
class      427  transform.translate
class      410  transform.get_from_gdi
class      352  transform.set
class      294  transform.new
class      273  transform
class      512  tickset_g.NearestSelectedTick
class      603  tickset_g.on_a_specified
class      809  tickset_g.on_a_major
class     2170  tickset_g._mtext_label
class      342  tickset_g._init_dlg_ticks
class      422  tickset_g._set_dlg_tick
class      954  tickset_g._compute_zs
class    10041  tickset_g.draw
class      272  tickset_g.specifiedmax
class      272  tickset_g.specifiedmin
class     1004  tickset_g.overallmax
class     1173  tickset_g.overallmin
class      681  tickset_g.delete_tick
class     1195  tickset_g.edit_tick
class      432  tickset_g._has_customs
class      502  tickset_g.set_custom
class      862  tickset_g.add_change_tick
class     1082  tickset_g.add_ticks
class      797  tickset_g._clear_rule_ticks
class     1368  tickset_g.range_ticks
class      340  tickset_g.none_ticks
class      419  tickset_g.minmax_ticks
class      293  tickset_g.reset_between_ticks
class      796  tickset_g.suggest_between_ticks
class      535  tickset_g.suggest_ticks
class      510  tickset_g.suggest_ticks_current
class     3704  tickset_g._label_overhangs
class      472  tickset_g._value_label_series
class      885  tickset_g._max_multi_height
class     2103  tickset_g._biggest_label
class     1156  tickset_g._tick_and_label_width
class      483  tickset_g._matching_label_find
class      395  tickset_g._matching_label_position
class      536  tickset_g._matching_label_editstyle
class     1017  tickset_g._matching_label_size
class      473  tickset_g.tick_values
class      327  tickset_g.clear
class      349  tickset_g.clear_ticks
class      292  tickset_g.set_default
class     1117  tickset_g.set_transform
class      309  tickset_g.set_format
class     2794  tickset_g.set_ticks
class      276  tickset_g.set_reverse
class      278  tickset_g.set_trans
class     2074  tickset_g.set_ticks_trans
class      278  tickset_g.set_pow2
class     1252  tickset_g.set_ticks_pow2
class      274  tickset_g.set_scale
class      273  tickset_g
class      271  subview
class      328  scale.reinit
class     1945  scale.ln_natural_mult
class      317  scale.natural_mult
class     1168  scale.pos_in_natural_metric
class     1190  scale.pos_in_size_metric
class      513  scale.add_views
class      991  scale.reset_from_axes
class      270  scale.setfmt
class      398  scale.set_transform
class      306  scale.resetcur
class      384  scale.addcur
class      372  scale.curset
class      368  scale.addmax
class      368  scale.addmin
class      733  scale.addseries
class     2172  scale.setgdi
class      356  scale.add_view
class      406  scale.get_time_format
class      346  scale.add_axis
class      823  scale.set
class      295  scale.new
class      270  scale
class      271  mapping
class      911  gditransform.rescale
class      276  gditransform
class      273  dimension
class      278  transformstyle
class      268  sized_textbox._super_draw
class      513  sized_textbox.draw
class     1208  sized_textbox.swap_alignment
class      480  sized_textbox._specified_textheight
class      332  sized_textbox._has_specified_textheight
class      476  sized_textbox._specified_textwidth
class      330  sized_textbox._has_specified_textwidth
class      467  sized_textbox.textwidth
class      890  sized_textbox.ysize
class      892  sized_textbox.xsize
class      611  sized_textbox.set
class      302  sized_textbox.new
class      277  sized_textbox
class      329  textbox.resetstyle
class      641  textbox._set_orientation
class      465  textbox.SetCustom
class      890  textbox.EditCustomStyle
class     1037  textbox.BrowserName
class      351  textbox.DragBy
class      407  textbox.DragTo
class      813  textbox.rebreak_aspect
class      718  textbox._draw_box
class     2977  textbox._get_x_y_delta
class     1526  textbox.draw
class      523  textbox.wdinches
class      406  textbox.inches
class      467  textbox.textwidth
class      378  textbox.textheight
class      825  textbox.ysize
class      819  textbox.xsize
class      286  textbox.not_drawn
class      398  textbox.get_text
class     1998  textbox.edit
class      278  textbox.set
class      310  textbox.new
class      271  textbox
class      316  view.draw
class      942  view.extent
class      346  view.ysize
class      346  view.xsize
class      268  view
class      256  anyview_g.runprogram
class      545  anyview_g.AtClickedPos
class      699  anyview_g.AddSelectedViews
class      347  anyview_g.Delete
class      473  anyview_g._maybe_fixup_old_gph_array
class      340  anyview_g.MaybeCreateArray
class      432  anyview_g.AddMarker
class      451  anyview_g.AddLine
class      458  anyview_g.AddTextBox
class      422  anyview_g.gdi_xposn
class      422  anyview_g.gdi_yposn
class      353  anyview_g.set_gdi_posn_notrans
class      405  anyview_g.set_gdi_posn
class     1974  anyview_g.compass_draw
class      494  anyview_g.setstyle
class      618  anyview_g.set
class      294  anyview_g.new
class      273  anyview_g
class      287  as_custom_ed.objspecific_index
class      325  as_custom_ed.CustomProperties
class      469  as_custom_ed.SetRightMenu
class      733  as_custom_ed.EditCustomStyle
class      327  as_custom_ed.SelectedCustomIndex
class      277  as_custom_ed
class      318  stretchability.new
class      278  stretchability
class      413  tb_orientstyle._unabbrev
class      278  tb_orientstyle
class      359  textboxstyle.setgdifull
class      929  textboxstyle.setgdi
class      746  textboxstyle.set
class      371  textboxstyle.new
class      276  textboxstyle
class     2091  compass2dir._unabbrev
class      331  compass2dir.issouth_orcenter
class      331  compass2dir.isnorth_orcenter
class      324  compass2dir.iswest_orcenter
class      324  compass2dir.iseast_orcenter
class      302  compass2dir.issouth
class      302  compass2dir.isnorth
class      295  compass2dir.iswest
class      295  compass2dir.iseast
class      320  compass2dir.angle
class      275  compass2dir
class      300  margin.wdinches
class      300  margin.inches
class      283  margin.gmbottom
class      280  margin.gmtop
class      282  margin.gmright
class      281  margin.gmleft
class      299  margin.setting
class      484  margin.editstyle
class      507  margin._has_dash_unit
class     2352  margin.setstyle
class      759  margin.setgdi
class      281  margin.bottom
class      278  margin.top
class      280  margin.right
class      279  margin.left
class      470  margin.set
class      371  margin.new
class      270  margin
class      383  axisstyle.inches
class      674  axisstyle._unabbrev
class      340  axisstyle.zero_numticks
class      367  axisstyle.extend
class      365  axisstyle.new
class      273  axisstyle
class      286  ticksetstyle.inches
class      387  ticksetstyle.ticked
class      365  ticksetstyle.new
class      276  ticksetstyle
class      365  gridstyle.new
class      273  gridstyle
class      489  tickstyle.inches
class      305  tickstyle.setgdifull
class      299  tickstyle.setgdi
class      293  tickstyle.tick_and_gap
class      368  tickstyle.tick0
class      327  tickstyle.tick_length
class      553  tickstyle.label_width
class      765  tickstyle.size
class      450  tickstyle.new
class      273  tickstyle
class      284  textstyle.setgdifull
class     1805  textstyle.setgdi
class     1182  textstyle.align2compass
class      745  textstyle.set
class      371  textstyle.new
class      273  textstyle
class      532  relative_posn.gridpos
class      364  relative_posn.perpendicular_dim
class      364  relative_posn.parallel_dim
class      277  relative_posn
class      618  anglestyle._unabbrev
class      388  anglestyle._in_plusminus45
class      558  anglestyle.nearest_orientation
class      454  anglestyle._in_180
class      290  anglestyle.left
class      290  anglestyle.right
class      291  anglestyle.below
class      284  anglestyle.above
class      291  anglestyle.radians
class      364  anglestyle.is_reversed
class      281  anglestyle.new
class      274  anglestyle
class      528  vertical_text.shift_factor
class      389  vertical_text.compassdir
class      277  vertical_text
class      480  horizontal.shift_factor
class      378  horizontal.compassdir
class      274  horizontal
class      608  yesno._unabbrev
class      317  yesno.set_swap
class      377  yesno.set_xor
class      341  yesno.set01
class      278  yesno.isfalse
class      273  yesno.set_off
class      273  yesno.set_no
class      273  yesno.set_false
class      274  yesno.set_on
class      274  yesno.set_yes
class      274  yesno.set_true
class      269  yesno
class      579  linestyle.setgdifullspecial
class      279  linestyle.setgdifull
class      447  linestyle.setgdi
class      370  linestyle.blank_line
class      328  linestyle.patterned_line
class      623  linestyle.set
class      373  linestyle.new
class      273  linestyle
class      261  alignstroke.setgdifull
class      286  alignstroke.setgdi
class      642  alignstroke.set
class      401  alignstroke.new
class      276  alignstroke
class      525  linepattern._add_line
class      566  linepattern._add_space
class     1693  linepattern._DecodePat
class      271  linepattern._set_pattern
class      279  linepattern.setgdifull
class      278  linepattern.setgdi
class     1373  linepattern.setstyle
class      840  linepattern.set
class      276  linepattern.new
class      275  linepattern
class      400  color.setrgba
class      279  color.setopacity
class      616  color._unabbrev
class      563  color._set_changed
class      849  color._post_all
class     2914  color.dialog_box
class     1381  color._hsv2rgb
class      976  color._rgb2hsv
class      247  color.add_colorname
class      703  color.setgdifull
class     1079  color.setgdi
class      426  color.setintensity
class     1261  color.setintensity0
class      293  color.setintensity100
class      339  color.setcolor
class      390  color.setrgbhex
class      258  color.hsb
class      298  color.hsv
class      290  color.hue
class      267  color.setvalue
class      499  color.setbright
class      499  color.setsat
class      479  color.sethue
class      872  color.setcmyk
class      437  color.sethsb
class      333  color.setrgb
class      272  color.setting
class     5116  color.setstyle
class     1086  color.set
class      405  color.new
class      269  color
class      271  gditype
class      357  fixedcode.new
class      273  fixedcode
class      935  code.dialog_box
class      323  code.namelist
class      281  code.nameof
class      320  code.codeof
class      574  code.addat
class      736  code.add
class      282  code.setting
class      514  code.setcode
class      504  code.set
class      294  code.new
class      268  code
class      279  linewidth.setgdifull
class      280  linewidth.setgdi
class      282  linewidth.new
class      273  linewidth
class      370  tickposition._unabbrev
class      276  tickposition
class      593  gsize.stylesetting
class      615  gsize.inches
class      625  gsize.pts
class     1013  gsize.gmval
class     1182  gsize.setstyle
class      270  gsize
class      273  sizetype
class      273  codestyle
class      281  numticks_g.new
class      274  numticks_g
class      325  numstyle.setting
class      871  numstyle.setstyle
class      447  numstyle.set
class      275  numstyle.new
class      272  numstyle
class     1116  style.ReadPrefs
class      268  style.setmyfun
class      547  style._declare_in_scheme
class      919  style._splitname
class     1199  style.get_editstyle
class     3094  style.editstyle
class      471  style.Restyle
class     1355  style._reset_attrib_val
class      558  style.RestyleVal
class      314  style._Set_Attrib
class      564  style.restyle
class     3430  style._read_style
class      672  style._populate_stylenames
class      764  style.log_remake
class     1407  style.remake_as_copy
class     1007  style.add_style
class      504  style.set_styledex
class      308  style.is_named
class      513  style.stylelist
class      434  style.isleaf
class      464  style.namedstyle
class      315  style.hasstyles
class      630  style.logsetstyle
class      269  style
  ado      536  gs_stat.Stat
  ado      552  gs_stat.Query
  ado      905  gs_stat.Assert
  ado      415  gs_stat
class      396  cglobal_g.set
class      273  cglobal_g
  ado      909  gr_current.OldGraph
  ado     1339  gr_current
class      315  null.nameof
class      268  null
  ado     1385  findfile
class      363  scheme._list1
class      424  scheme._list_numbered
class      408  scheme._list_all_styles_for_class
class      575  scheme._list_by_style
class      573  scheme.list_styles
class      346  scheme._dupline
class      338  scheme._badline
class      669  scheme.declare_style
class      551  scheme.style_edit
class      543  scheme.decl_style
class     2242  scheme.setscheme
class      328  scheme._mapcl
class     1555  scheme.style
class      590  scheme.new
class      270  scheme
  ado     1140  gr_setscheme
class      293  global_g.BrowserReinit
class      809  global_g.ResetEditor
class      391  global_g.AddSelected
class      292  global_g.Container
class      489  global_g.pop_prefix
class      404  global_g.extend_prefix
class      481  global_g.set_shift
class      501  global_g.set_click
class      381  global_g.prototypename
class      295  global_g.set_current_graph
class      468  global_g.current_graph_resync
class      396  global_g.set
class      345  global_g.ResetPrototypeDefaults
class      757  global_g.SetPrototypes
class      272  global_g
class      469  object._axis_set_ranges
class     1171  object._gr_axes_wrk_arr
class      348  object._gr_axes_wrk
class      605  object._style_drillable
class      818  object._gr_link_wrk_arr
class      348  object._gr_link_wrk
class      569  object._style_cleanup
class      549  object._any_named_styles
class      508  object._lastname
class      572  object._holdername
class      620  object._restname
class      600  object._topname
class      930  object._process_copy
class     1235  object._copy_style_db
class      455  object._db_apply
class      623  object._run_view
class     1543  object._array_db
class     2006  object._post_changes
class      425  object._post_style
class      515  object._set_changed
class      880  object._post_all
class      771  object._place_ok_cancel
class     4122  object._place_controls_from
class     3611  object.dialog_box
class      495  object.showlog
class      503  object._is_scheme_edit
class     1307  object.runfromfile
class      436  object.savetofile
class      723  object._saveall_arr
class      859  object.saveall
class      425  object.popifcontains
class      608  object.popifendsin
class      291  object.poplog
class      317  object.attribname
class      270  object
class      271  dbstyle
  ado      414  graph.ErrUsing
  ado      348  graph.InvalidFamily
  ado      416  graph.ByParts
  ado      877  graph.MergeBy
  ado     1034  graph.GetPieCmd
  ado      669  graph.GetBarCmd
  ado      809  graph.SetFixedSize
  ado      453  graph._unab_do
  ado     5971  graph.Graph
  ado      838  graph
  ado      528  twoway__histogram_gen.CheckGenOpt
  ado      394  twoway__histogram_gen.DropGenVars
  ado     5407  twoway__histogram_gen
  ado      822  _check4gropts
  ado     1506  _get_gropts.GetPassThruOptions
  ado     3358  _get_gropts
  ado      416  _gs_by_combine.ByParts
  ado      877  _gs_by_combine.MergeBy
  ado      452  _gs_by_combine
  ado     5860  histogram
  ado      308  hist
  ado      383  webuse.Query
  ado      764  webuse.Set
  ado      428  webuse.GetDefault
  ado      877  webuse
  ado      792  _StataKernelCompletions
  ado      242  clear.clearreturn
  ado      603  clear._clear_9
  ado     1915  clear
      --------
        783355

%matrices%


. `bcc4869c9c119320f7af8a3981776720'
. mata : invtokens(st_dir("local", "macro", "*")')
  __000000 __user_rc

. `08a286cef0dc100f5df674f2b5353f29'
. macro list `:all globals'
stata_kernel_graph_counter:
                1
T_gm_fix_span:  0
S_ADO:          BASE;SITE;.;PERSONAL;PLUS;OLDPLACE;`"/Users/stanton/anaconda3/li
                > b/python3.9/site-packages/stata_kernel/ado"'
S_level:        95
F1:             help advice;
F2:             describe;
F7:             save
F8:             use
S_StataMP:      MP
S_StataSE:      SE
S_FLAVOR:       Intercooled
S_OS:           MacOSX
S_OSDTL:        12.4.0
S_MACH:         Macintosh (Intel 64-bit)

. `acf5410dffcb668adf37da696e87d400'
. _StataKernelLog on

. `d450cfde56d6cad2042c8f0870cc76f5'
. include "/Users/stanton/.stata_kernel_cache/include.do"

. _StataKernelResetRC, num(``__user_rc'')

. macro drop _`__user_rc'

. macro drop ___user_rc

. . `d1d0b5544eadcba44c5f1aa5695588da'

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:

webuse auto
hist weight

Expected Output

A histogram

Other information

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

  • Operating System
  • Stata version
  • Package version (You can find this by running pip show stata_kernel in your terminal.)
@ckrf
Copy link

ckrf commented Jul 16, 2022

Reporting the same issue, although I had never had it work on this specific system.

  • Windows 10
  • Stata 17
  • stata-kernel 1.12.2

@ideabucket
Copy link

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:

@cocopops17
Copy link

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.

@ticoneva
Copy link

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.

@harningle
Copy link

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.

It seems to be fixed, but somehow not merged into the master branch? pip install git+https://github.com/mcaceresb/stata_kernel.git@dev-stata17-graph-fix works well for me so far.

@DongGilKim
Copy link

I am using

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.

It seems to be fixed, but somehow not merged into the master branch? pip install git+https://github.com/mcaceresb/stata_kernel.git@dev-stata17-graph-fix works well for me so far.

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.

@hugetim
Copy link

hugetim commented Mar 17, 2023

Have you tried pystata_kernel? Or https://github.com/hugetim/nbstata, which I think is now at least feature-equivalent to stata_kernel.

@DongGilKim
Copy link

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)".
https://www.stata.com/python/pystata/install.html#method-1-installing-via-pip

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.
https://www.statalist.org/forums/forum/general-stata-discussion/general/1650118-pystata-does-not-work-in-mac-m1

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...

@jcolond
Copy link

jcolond commented Dec 22, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants