wakatime / legacy-python-cli

Command line interface used by all WakaTime text editor plugins.
https://wakatime.com/
BSD 3-Clause "New" or "Revised" License
1.02k stars 84 forks source link

WakaTime: Unknow Error(2) #155

Open nicholasinatel opened 5 years ago

nicholasinatel commented 5 years ago

Hello, sorry for the issue, but i have researched all the closed and open issues and did not figured it out. I am using Visual Studio Code version: in Windows 10. With WakaTime version: 1.2.4 I have been using it for a month and it was fine, i have purchased the paid version and now i have waka time error not logging my work. The visual studio asks me for seeing the .wakatime.log file for more information but it is empty. I tried to debug but nothing happens. What is going on please?

alanhamlett commented 5 years ago

After turning on debug mode are there error messages printed to your Developer Console inside VS Code?

This sounds like the plugin isn't able to execute wakatime-cli any longer, most likely due to a problem with Python.

https://github.com/wakatime/vscode-wakatime#troubleshooting

nicholasinatel commented 5 years ago

You are right, the problem is this pythonw: can't open file '"path\wakatime\cli.py" [Errno 2] Invalid argument Managed to see the log now. It seems to be the same problem as 51. However the solution proposed of no_ssl_verify = true did not work either. I will dig in deeper in this problem and post the answer here. Here are my logs:

[Extension Host] vscode-icons is active!
log.ts:157  INFO no standard startup: not a new window
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Initializing WakaTime v1.2.4
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Looking for python at: C:\Users\Nicholas Fernandes\.vscode\extensions\wakatime.vscode-wakatime-1.2.4\out\python\pythonw
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Invalid python version: 
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Looking for python at: python3
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Invalid python version: 
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Looking for python at: pythonw
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Valid python version: Python 3.7.1

console.ts:134 [Extension Host] [WakaTime] [DEBUG] Downloading wakatime-core...
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Extracting wakatime-core into "C:\Users\Nicholas Fernandes\.vscode\extensions\wakatime.vscode-wakatime-1.2.4\out"...
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Finished extracting wakatime-core.
console.ts:134 [Extension Host] [WakaTime] [DEBUG] Sending heartbeat: pythonw "\"C:\Users\Nicholas Fernandes\.vscode\extensions\wakatime.vscode-wakatime-1.2.4\out\wakatime-master\wakatime\cli.py\"" --file "\"c:\Users\Nicholas Fernandes\Source\Full-Stack\Fiscoserv\FiscoDashBoard\index.html\"" --plugin "\"vscode/1.29.1 vscode-wakatime/1.2.4\"" --alternate-project Source --config "\"C:\Users\Nicholas Fernandes\.wakatime.cfg\"" --logfile "\"C:\Users\Nicholas Fernandes\.wakatime.log\""
console.ts:134 [Extension Host] [WakaTime] [ERROR] pythonw: can't open file '"C:\Users\Nicholas Fernandes\.vscode\extensions\wakatime.vscode-wakatime-1.2.4\out\wakatime-master\wakatime\cli.py"': [Errno 22] Invalid argument

t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
console.ts:134 [Extension Host] [WakaTime] [ERROR] Error: Command failed: pythonw "C:\Users\Nicholas Fernandes\.vscode\extensions\wakatime.vscode-wakatime-1.2.4\out\wakatime-master\wakatime\cli.py" --file "c:\Users\Nicholas Fernandes\Source\Full-Stack\Fiscoserv\FiscoDashBoard\index.html" --plugin "vscode/1.29.1 vscode-wakatime/1.2.4" --alternate-project Source --config "C:\Users\Nicholas Fernandes\.wakatime.cfg" --logfile "C:\Users\Nicholas Fernandes\.wakatime.log"
pythonw: can't open file '"C:\Users\Nicholas Fernandes\.vscode\extensions\wakatime.vscode-wakatime-1.2.4\out\wakatime-master\wakatime\cli.py"': [Errno 22] Invalid argument

t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180
console.ts:134 [Extension Host] [WakaTime] [ERROR] Unknown Error (2); Check your C:\Users\Nicholas Fernandes\.wakatime.log file for more details.
nicholasinatel commented 5 years ago

Tried to change the python version from 3.7 to 3.6.4, still same error.

nicholasinatel commented 5 years ago

This did not work for me, trying again tomorrow:

I finally got it working again. Looks like the extension is unable to download the wakatime-cli/core correctly and somehow the previously existing one was removed I downloaded it directly from the github and extracted it into .vscode\extensions\WakaTime.vscode-wakatime-1.2.1\out Additionally I updated the plugin by using "Extensions: Check for Updates" because the status page told me there was a newer version available(vscode didn't show this) this changed the extensions version from 1.2.0 to 1.2.1

nicholasinatel commented 5 years ago

This did not work for me, trying again tomorrow:

I finally got it working again. Looks like the extension is unable to download the wakatime-cli/core correctly and somehow the previously existing one was removed I downloaded it directly from the github and extracted it into .vscode\extensions\WakaTime.vscode-wakatime-1.2.1\out Additionally I updated the plugin by using "Extensions: Check for Updates" because the status page told me there was a newer version available(vscode didn't show this) this changed the extensions version from 1.2.0 to 1.2.1

alanhamlett commented 5 years ago

If this is still a problem let's keep it open until it's fixed?

nicholasinatel commented 5 years ago

Sorry this is still a problem, i have closed it by accident, i am busy this end of the year, i will be coming back to resolving this issue in the near future, your extension is very good, it is very sad to be without my coding log charts. Congratulations for your extensions.

amruta-pani commented 5 years ago

@alanhamlett you helped me solve similar issue earlier this month over the email. My wakatime stays at initializing and it found to be an issue with Python version. You have done some magic and released a new version and I installed it which resolved the issue.

But lately, the issue popped up again with the same reason after I updated my mac OS to 10.14.4.

[Extension Host] [WakaTime][DEBUG] Looking for python at: /Users/hanu/.vscode/extensions/wakatime.vscode-wakatime-2.0.6/python/pythonw
console.ts:134 [Extension Host] [WakaTime][DEBUG] Invalid python version: 
console.ts:134 [Extension Host] [WakaTime][DEBUG] Looking for python at: python3

So, would this require another new version or it is something to do on my side?

SSmale commented 5 years ago

I was having this error until I rolled it back to 2.0.8 then reinstalled 2.0.9

alanhamlett commented 5 years ago

would this require another new version or it is something to do on my side?

@amruta-pani that's a normal debug message when the plugin looks for the location of Python on your machine. It should go away if you turn off debug mode. You should also leave debug mode off normally since it can slow down the plugin sometimes.

anderking commented 4 years ago

Install other version