Closed mbaker21231 closed 8 years ago
Hi, Matt. Thanks for letting me know, awesome to hear that you find good use for it!
I actually encountered this problem myself on my own personal computer (also Win 10 + Python 3.5), but after I restarted my computer the problem magically disappeared. Unfortunately I was unable to reproduce the bug as it only occurred once, hence the underlying cause is still in my code.
Can you try restarting your computer, I know it is a weird suggestion but that seemed to solve it for me.
My suspicion is that, for some reason, Stata is unable to create the log file which results in it being missing. If the restart did not solve it, can you try running it with the -os
argument, or alternatively you can run this in the cell below to reveal the Stata window:
%%stata
reveal all
Does this show any indication that the .log file was not created by Stata?
TIes --
Your suggestion about looking at things using the -os
argument quickly revealed what was wrong! When ipystata
is trying to create a log file on my home computer, the following error pops up:
. log using C:\Users\Matthew Baker\.ipython\stata\log_main.txt , text replace
invalid 'Baker'
r(198);
Evidently, the fact that my directory name has a space in it is creating the problem. Unless you have a really, really easy fix, I'll just uninstall everything in the directory, rename it, and reinstall whatever was there.
Best,
Matt
Hi Matt,
Of course, that explains. Luckily that is a very easy fix, if you update IPyStata to the newest version (that I just uploaded) it should be fixed.
Let me know if it still doesn't work or if you run into any other issues!
Ties --
Thanks a million - I actually changed a line in the ipython_magic.py
file in the package and was able to get it working (after realizing that renaming directories isn't such a great idea), but it's definitely better to stick with the formal package!
Matt
The update did the trick...thanks again!
First, I have been using ipystata and think it is great! I use it all the time on my work computer (Windows 7, Python 3.5), and have gotten it up and running on an Amazon Web Services Server as well.
I have, however, not been able to get it working on my home computer (Windows 10, Python 3.5).
Here is my code and the result:
Executing the last code block above results in:
As one can see, for some reason ipystata can't find a file called "log_main.txt". I have tried re-registering Stata, reinstalling ipystata, etc. but can't seem to get it going.
Any help or suggestions would be appreciated!
Matt Baker