wakatime / vim-wakatime

Vim plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/vim
BSD 3-Clause "New" or "Revised" License
1.03k stars 70 forks source link

install_cli.py not found #163

Closed LucasFA closed 10 months ago

LucasFA commented 1 year ago

This is pretty much the same as #154:

[WakaTime] 0: C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\opt\bin\python3w.exe: can't open file 'C:\C\Users\lucas\AppData\Local\nvim-data\lazy\vim-wakatime\scripts\install_cli.py': [Errno 2] No such file or directory

Notice the repetition in can't open file C:\C\..., like in issue 154.

My setup is Windows Neovim with Lazy, which I usually launch from git's bash command line - though if I am not mistaken it shouldn't change anything.

I just worked around it by manually executing install_cli.py, but figured it might be an issue somewhere. I deleted the following lines of code:

" Fix for Python installed with pacman on msys2
" Turns Windows path into Unix-like path
if s:IsWindows() && exepath(python_bin) =~ '[/\\]s\?bin[/\\]'
    let install_script = substitute(install_script, '^/\?\([a-zA-Z]\):/', '/\1/', '')
endif

Inside the InstallCLI function, which seemed to eliminat the errors on startup, but really am not sure about. I did this because it seemed that the original install_script variable was fine as I tested with echom install_script. One way or the other, this is not usually executed once the CLI is installed.

Here's the log. Be warned, it's 300 KB. If you want a shorter version or for me to test something, do tell me. wakatime.log

Now that I got it to work I don't mind it, but I figured I would post in case it's useful.

alanhamlett commented 11 months ago

If you delete those Fix for Python installed with pacman on msys2 lines and also delete ~/.wakatime/ folder does it re-download ~/.wakatime/wakatime-cli when vim starts?

alanhamlett commented 10 months ago

Does it work now after ba4537e36a81f1eb25d511d40eb59e0bb1acff87?

LucasFA commented 10 months ago

Hi! Thanks for the work. I've been pretty busy the last few weeks and most importantly I've completely migrated my workflow, but I'll set it back up again this weekend and let you know

alanhamlett commented 10 months ago

Closing for now. If you get a chance to test it let me know if I should re-open this issue.