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

Windows job_start not working with spaces in arguments #56

Closed
luochen1990 opened this issue Oct 27, 2017 · 11 comments
Closed

Windows job_start not working with spaces in arguments #56

luochen1990 opened this issue Oct 27, 2017 · 11 comments

Comments

@luochen1990
Copy link

OS: Windows 10
GVim: 8.0
vim-wakatime: 817f484

wakatime-bug-1
wakatime-bug-2
wakatime-bug-3
wakatime-bug-4

@alanhamlett
Copy link
Member

alanhamlett commented Apr 4, 2018

What's the output for this command inside Vim:

:echo printf('patch-7.4-2344=%d, job_start=%d, jobstart=%d, win32=%d, win64=%d', has('patch-7.4-2344'), exists('*job_start'), exists('*jobstart'), has('win32'), has('win64'))

@luochen1990
Copy link
Author

@alanhamlett patch-7.4-2344=1, job_start=1, jobstart=0, win32=1, win64=1

@luochen1990
Copy link
Author

I updated this plugin to the latest version, and the error messages seems providing more info now:

[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:\Users\Luo\Github\vimconf\bundle\vim-wakatime\plugin/packag
es/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbox\Workspace\test.hs" "--time" "1522851313" "--plugin" "vim/800 v
im-wakatime/7.1.0" "--language" "haskell"^@[WakaTime] Error: python: can't open file 'C:UsersLuoGithubvimconfbundle
vim-wakatimeplugin/packages/wakatime/cli.py': [Errno 2] No such file or directory

It seems that the path is not correctly processed in my system.

PS: my Python is installed using pacman which is provided by msys2, maybe this is the reason why other people using windows doesn't have the same problem.

@alanhamlett
Copy link
Member

Should be fixed with 81e2a93, can you see if it's fixed after updating the plugin?

@luochen1990
Copy link
Author

I'm now at the latest version:

* commit ab2a52a (HEAD -> master, tag: 7.1.1, origin/master, origin/HEAD)
| Author: Alan Hamlett <[email protected]>
| Date:   2018-04-04 08:13:22 -0700

And still keep reporting the following error messages:

[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522855265" "--plugin" "vim/800 vim-wakatime/7.1.1" "--write" "--language" "haskell"^@[WakaTime] Error:   File "C:/Users/Luo/Github/vim
conf/bundle/vim-wakatime/plugin/packages/wakatime/packages/requests/__init__.py", line 98, in <module>
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522855265" "--plugin" "vim/800 vim-wakatime/7.1.1" "--write" "--language" "haskell"^@[WakaTime] Error:     from . import packages
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522855265" "--plugin" "vim/800 vim-wakatime/7.1.1" "--write" "--language" "haskell"^@[WakaTime] Error: ImportError: bad magic number i
n 'wakatime.packages.requests.packages': b'\x03\xf3\r\n'

@alanhamlett
Copy link
Member

This is a new issue which means you should remove the vim-wakatime folder and re-install the plugin. #64 has more details.

@luochen1990
Copy link
Author

I mv the old dir of vim-wakatime to vim-wakatime.bak and re-installed it via vundle (but keeping the ~/.wakatime.cfg and ~/.wakatime.data files), and now it keep reporting the following errors:

[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error: usage: wakatime [-h] [--entity FILE] [--k
ey KEY] [--write] [--plugin PLUGIN]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--time time] [--lineno L
INENO] [--cursorpos CURSORPOS]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--entity-type ENTITY_TYP
E] [--proxy PROXY] [--no-ssl-verify]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--project PROJECT] [--al
ternate-project ALTERNATE_PROJECT]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--language LANGUAGE] [--
hostname HOSTNAME]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--disable-offline] [--hi
de-filenames] [--exclude EXCLUDE]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--include INCLUDE] [--in
clude-only-with-project-file]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--extra-heartbeats] [--l
og-file LOG_FILE] [--api-url API_URL]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error:                 [--timeout TIMEOUT] [--co
nfig CONFIG] [--verbose] [--version]
[WakaTime] Heartbeat Command: "python" "-W" "ignore" "C:/Users/Luo/Github/vimconf/bundle/vim-wakatime/plugin/packages/wakatime/cli.py" "--entity" "C:\Users\Luo\Dropbo
x\Workspace\test.hs" "--time" "1522896859" "--plugin" "vim/800 vim-wakatime/7.1.1" "--language" "haskell"^@[WakaTime] Error: wakatime: error: unrecognized arguments:
vim-wakatime/7.1.1

@luochen1990
Copy link
Author

luochen1990 commented Apr 5, 2018

I can confirm it is Windows specific.
Just now, I tried to install Python in WSL, and use vim under WSL and it works well, and I can see a curve in my wakatime dashboard now.

@alanhamlett
Copy link
Member

c02c9f2 supports spaces in arguments to cmd.exe now. Can you try updating vim-wakatime and see if it's working?

@alanhamlett alanhamlett changed the title Keep reporting error on Win10 Windows job_start not working with spaces in arguments Apr 5, 2018
@luochen1990
Copy link
Author

@alanhamlett It works now, thx!

But there is still a small problem: my vim is very slow to startup when wakatime is enabled. It takes me about 1 second to startup vim when wakatime is disabled, but about half a minute when wakatime is enabled.

@alanhamlett
Copy link
Member

That's great! The slow startup is caused by #60. Let's move the conversation to that issue.

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

2 participants