Closed patschi closed 10 years ago
Although I don't get many cmd windows on every tab change or save, I can confirm that one python.exe is displayed on any change.
This is caused by python_binary()
which checks the python version by running python.exe, which displays a CUI, before testing pythonw.exe for the version.
And how I can solve this annoying windows? :)
Although this is not a proper fix, it will remove the annoying windows windows.
python = "python"
to python = "pythonw"
You should no longer see the annoying windows :+1:
No sorry, didn't fixed it. Still after an restart of Sublime Text the windows continuing popping up.
Mhh..
Try changing line 52 to return "pythonw"
and see if that works. Because python.exe will always display a CUI but pythonw.exe wont so you want to force wakatime to always use pythonw.exe
Somehow, it still won't work. Don't know why.
def python_binary(): return "pythonw" if platform.system() == 'Windows': try: Popen([python, '--version']) except: for path in glob.iglob('/python*'): if exists(realpath(join(path, 'python.exe'))): python = realpath(join(path, 'python')) break try: Popen([python+'w', '--version']) python = python+'w' except: pass return python
Thats really weird because pythonw.exe should not display any windows.
Are you sure that it is WakaTime causing all the popups? Can you see what the window titles and/or content are?
No, it's popping up too fast. Immediality on every tab change or save - it's 100% from WakaTime/Python. I'm also sure, that pythonw.exe is the right executable file and it's working fine. But somehow, Wakatime/Sublime won't take over the changes to use pythonw.exe.
When I save I see a pythonw.exe and conhost.exe spawning. I see the following in my task manager:
I upgraded to the newest version of WakaTime - still having the popups. It seems to execute the right executable, but I still have them:
I thought pythonw wasn't supposed to open a command window. Can you check your WakaTime version using Package Control:
press ctrl+shift+p
then type list
and select Package Control: List Packages
. The version should be:
v2013.08.02.20.00.26
It's the latest version - Checked it right now. I did some hours ago a "Upgrade/Overwrite all packages" to go sure, that I have the latest version. Like you see on the last screenshot, it's working - it is successfully executing pythonw.exe instead of python.exe, but still with a own window.
Maybe I have a wrong Python version? I did downloaded the file "Python 3.3.2 Windows X86-64 MSI Installer" from http://www.python.org/getit/
bc8c1af287399f062274598aaa5f046d534d439f might fix this. It tells subprocess to not open a command window when invoking pythonw.
It is strange that it doesn't happen for me, but it's probably not something wrong with your Python version.
Very strange, yes. Sadly still the windows coming up. Does not Sublime Text have any integrated CURL-function or something like this, that pythonw.exe does't need to be used?
I could use Sublime Text 3's async events to import and run the wakatime-cli script without using subprocess.
Still not working. I also currently got a other warning the 3rd time:
The "taking too long" error from ST2 is fixed in v0.4.1 using threading.
When using Sublime Text 3 for Windows, the cmd windows won't open because wakatime-cli.py is no longer called in a new process. Instead, the wakatime package is imported directly in a non-blocking thread.
Unfortunately, Sublime Text 2 doesn't have support for SSL in the embedded Python so a child process is still used and could cause command windows to open on the Windows platform. I'm not sure how to get around this right now.
The windows only coming up with SSL? Could change to plugin to HTTP to avoid these windows?
The api doesn't accept HTTP requests to prevent someone intercepting a user's api key.
mhh, than I will make a workaround somehow. I could change the site in the plugin and call a HTTP-site in my local network on my NAS, which is forwarding the request to the site with SSL :D
I really want to use this plugin, but the windows are really annoying.
I'll fix it eventually with a local/offline version of WakaTime, but it would be great to find out why pythonw opens cmd windows when it shouldn't: http://docs.python.org/2/using/windows.html#executing-scripts
If only I could reproduce the issue in my environment.
I've switched to using kennethreitz/requests instead of urllib2 and haven't noticed any SSL errors in my ST2 testing on Windows.
EDIT: seems that it's as @fnkr says - git is the problem. After removing cygwin bin from my path, i installed latest git version and added it to my path - cmds started popping up again.
Removing any folder from path that contains git.exe seems to be the fix.
Good to know what the issue is, but I strongly need git in the command line, so I don't want to remove it from the PATH variable. Someone knows any other workaround? :)
That's why I wasn't ever able to reproduce it! Now that I know the problem I can fix it in the plugin by checking for pythonw.exe first in the default location C:\python33\ before using the system path.
Thanks for figuring this out @mtfd!
Is there already an ETA for the bugfix?
Fixed with e812e9fe15ea6966683ed7490c0ecf701cc0994e.
Just released a new plugin version 1.4.4 that doesn't run git command line, so no more popup window.
Sadly some popups are still coming up on my PC :( Seems to be a other issue... I already updated to version v1.4.4
Cool, that fixed it for me :+1:
@patschi can you try restarting Sublime and see if the popup windows still open?
Doesn't help. Still the popups are coming up - it's also not easily possible to remove the plugin again, because on every selecting of "Packages: remove package" the popup of any process is pushing me out of the selection.
But I lukely I could catch an screenshot (which isn't very good to read, but it's possible) of the fast windows and it's possible to read, that an svn.exe will be called:
@patschi ok makes sense. when a git repo isn't found, WakaTime looks for a subversion project to set the project's name. I'll fix this for you tonight!
Nice to hear - Thanks! :) Would be nice, if it would be possible to manually set the project name for files or folders.
The project name gets set from the name of your git directory, so changing the name of your top git directory will change your project's name.
You also don't have to actually use git to have WakaTime recognize the project's name. Just initialize a git repo inside your project folder using git init
and then WakaTime recognizes the project's name even if you don't use git anytime after.
Fixed with fe641d01d4d0741a0b8dcddcfe3ba4e795952f6d by removing support for Subverison projects on Windows platform.
Upgrading to v1.4.5 should prevent any popup windows from opening.
@patschi Can you please let me know if this is fixed for you?
It seems to work - Great! :)
Awesome!
Would be nice if WakaTime can read the project name from subversion local repo :)
For now, you can use a .wakatime-project file in your project directory to set the project's name:
I'm seeing this same problem now on Windows 10 (x64) and with Sublime WakaTime 7.0.2
Is this the right place to address this or should I open a new issue?
A new issue would be better, with a ton of info to help us find the cause :)
Hello,
it's very very disturbing that on every tab change or save of any file are popping up like five python cmd windows! Sometimes when I'm programming something the windows pops up and disturbs me while I'm coding. I even sent about 2 days a tweet on your account - no response.
I installed the latest python version from the page you linked on the sublime-help page and put it with the name "Python" in the Sublime folder and in C:\Progs\ and added the python.exe to my $PATH variable.
I've Windows Ultimate x64. Please fix it. I really love the project, but the much disturbing blinking windows makes me really crazy.
Thanks.