kylebarron / stata-exec

Run Stata code from the Atom text editor on Windows, Mac, or Linux
https://atom.io/packages/stata-exec
MIT License
28 stars 9 forks source link

Uncaught TypeError: this.con.DoCommandAsync is not a function #27

Closed stevenlis closed 6 years ago

stevenlis commented 6 years ago

I encounter this problem in Atom whenever I shut down Stata while Atom is open. It cannot be solved by reopening Stata but restarting Atom.

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.24.1 x64 Electron: 1.6.16 OS: Microsoft Windows 10 Pro Thrown From: stata-exec package 1.4.3

Stack Trace

Uncaught TypeError: this.con.DoCommandAsync is not a function

At C:\Users\liqia\.atom\packages\stata-exec\lib\stata-exec.js:203

TypeError: this.con.DoCommandAsync is not a function
    at Object.sendCode (/packages/stata-exec/lib/stata-exec.js:203:20)
    at Object.sendCommand (/packages/stata-exec/lib/stata-exec.js:147:10)
    at HTMLElement.subscriptions.add.atom.commands.add (/packages/stata-exec/lib/stata-exec.js:92:45)
    at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.24.1/resources/app/src/command-registry.js:388:36)
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.24.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:621:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.24.1/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:412:28)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.24.1/resources/app/src/window-event-handler.js:108:40)

Commands

  2x -0:27.7.0 stata-exec:send-command (input.hidden-input)

Non-Core Packages

atom-python-run 0.9.6 
atom-runner 2.7.1 
autocomplete-python 1.10.5 
busy-signal 1.4.3 
copy-on-select 0.2.0 
file-icons 2.1.17 
highlight-selected 0.13.1 
Hydrogen 2.3.0 
intentions 1.1.5 
language-stata 1.3.1 
linter 2.2.0 
linter-flake8 2.3.0 
linter-ui-default 1.7.1 
material 2.2.0 
minimap 4.29.8 
minimap-highlight-selected 4.6.1 
python-autopep8 0.1.3 
script 3.17.3 
stata-exec 1.4.3 
Visual-Studio-2015-Dark-Theme 2.4.2 
visual-studio-code 0.4.0 
visual-studio-dark-syntax 0.2.0 
stevenlis commented 6 years ago

I also found that it is unable to run more than one Stata programs simultaneously. I can only run one do file in atom at a time. If I open the first do file and then clear everything in stata, then start to run the second do file, which began with “use”. Then stata will return 601 error, the file was not found. I have to restart Atom and open the second do file to run it. Is this caused by the desige of the package? Or something to debug?