wakatime / notepadpp-wakatime

Notepad++ plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/notepad++
BSD 3-Clause "New" or "Revised" License
82 stars 31 forks source link

Not detecting installed Python, and SSL error when downloading embedded Python #35

Closed alanhamlett closed 4 years ago

alanhamlett commented 5 years ago

Error from WakaTime.log file:

[Wakatime Info 10:46:28 odp.] Initializing WakaTime v4.1.0
[Wakatime Debug 10:46:28 odp.] Downloading python...
[Wakatime Debug 10:46:28 odp.] No proxy will be used. It's either not set or badly formatted.
[Wakatime HandledException 10:46:28 odp.] Are you behind a proxy? Try setting a proxy in WakaTime Settings with format https://user:pass@host:port. Exception Traceback:: System.Net.WebException: Požadavek byl přerušen: Nelze vytvořit zabezpečený kanál SSL/TLS..
   v System.Net.WebClient.DownloadFile(Uri address, String fileName)
   v WakaTime.Dependencies.DownloadAndInstallPython()
   v WakaTime.WakaTimePackage.InitializeAsync()
[Wakatime Info 10:46:28 odp.] Finished initializing WakaTime v4.1.0
[Wakatime HandledException 10:46:36 odp.] Could not send heartbeat because python is not installed: 
[Wakatime HandledException 10:46:44 odp.] Could not send heartbeat because python is not installed: 

The exception error message is: System.Net.WebException: Request aborted: Unable to create secure SSL / TLS channel

I installed Python in default location (local) then again in "C:\Python" and still not working.

alanhamlett commented 5 years ago

@gandarez would you be able to help debug this one?

gandarez commented 5 years ago

Sure @alanhamlett. I'll take care of it.

ozh commented 4 years ago

Having the same problem. Using latest 32 bits NPP, installing plugin manually or via the plugin admin gets the same result. I'm not behing any kind of proxy

All I get is

[Wakatime Info 12:23:10 ] Initializing WakaTime v4.1.0
[Wakatime Debug 12:23:10 ] Downloading python...
[Wakatime Debug 12:23:10 ] No proxy will be used. It's either not set or badly formatted.
[Wakatime HandledException 12:23:10 ] Are you behind a proxy? Try setting a proxy in WakaTime Settings with format https://user:pass@host:port. Exception Traceback:: System.Net.WebException: La demande a été abandonnée : Impossible de créer un canal sécurisé SSL/TLS.
   à System.Net.WebClient.DownloadFile(Uri address, String fileName)
   à System.Net.WebClient.DownloadFile(String address, String fileName)
   à WakaTime.Dependencies.DownloadAndInstallPython()
   à WakaTime.WakaTimePackage.InitializeAsync()
[Wakatime Info 12:23:10 ] Finished initializing WakaTime v4.1.0
[Wakatime HandledException 12:23:18 ] Could not send heartbeat because python is not installed: 
[Wakatime HandledException 12:23:26 ] Could not send heartbeat because python is not installed: 
[Wakatime HandledException 12:23:34 ] Could not send heartbeat because python is not installed: 
[Wakatime HandledException 12:23:42 ] Could not send heartbeat because python is not installed: 
[Wakatime HandledException 12:23:50 ] Could not send heartbeat because python is not installed:
and so on 

What is needed exactly and where do I put it?

alanhamlett commented 4 years ago

You can try installing Python from https://www.python.org/downloads/

JaredDRobbins commented 4 years ago

Python WAS installed. The issue was that the Notepad++ installer does not install all folders/files needed. After installing the Visual Studio plugin Notepad++ started working.


From: Alan Hamlett notifications@github.com Sent: Saturday, June 13, 2020 10:24:10 PM To: wakatime/notepadpp-wakatime notepadpp-wakatime@noreply.github.com Cc: JaredDRobbins jared.robbins@hotmail.com; Comment comment@noreply.github.com Subject: Re: [wakatime/notepadpp-wakatime] Not detecting installed Python, and SSL error when downloading embedded Python (#35)

You can try installing Python from https://www.python.org/downloads/

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/wakatime/notepadpp-wakatime/issues/35#issuecomment-643712286, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK2VAYIGCSVMBLQBJ4J7PLTRWQ7FVANCNFSM4IJ4CM7A.

GwynHannay commented 4 years ago

Was installing the Visual Studio plugin the only way to solve it? I don't use Visual Studio. I also already have Python installed, have attempted to install the Notepad++ plugin via "Plugins Admin", as well as manually creating the "allowAppDataPlugins.xml" file, ensuring that the dll is within the Notepad++/plugins folder (as well as Notepad++/plugins/WakaTime), ensuring that I've downloaded the latest x64 copy from GitHub, and confirming that my API key is correct, but I continue to receive the same errors as @ozh

JaredDRobbins commented 4 years ago

Was installing the Visual Studio plugin the only way to solve it?

For me, installing the Visual Studio plugin is the only thing that has worked. I use it only occasionally as Notepad++ is my preferred editor but after installing the Visual Studio plugin for WakaTime and watching it add the missing folders/files the Notepad++ plugin has been working.

TorrentofShame commented 4 years ago

I got it working by installing the wakatime cli and embedded python manually by copying what the program would normally do in Dependencies.cs. ie; Downloading x64 embeddable python 3.5.2 and extracting to AppData/Roaming/Wakatime/python and Downloading wakatime cli source code zip and extracting to AppData/Roaming/Wakatime/wakatime-master

GwynHannay commented 4 years ago

Thanks, Simon! It took me forever to work out which repo was the "wakatime cli source code" so I'm including it here for future users. But I got it all working thanks to your information.

Per instructions from @TorrentofShame:

  1. Download the Python 3.5.2 "embeddable zip file" (I haven't tested other Python versions) and dump the files into AppData/Roaming/Wakatime/python https://www.python.org/downloads/release/python-352/
  2. Download the "Source code (zip file)" from the latest release of the NPP plugin and dump the files into AppData/Roaming/Wakatime/wakatime-master https://github.com/wakatime/notepadpp-wakatime/releases/tag/4.1.0

Cheers. :-)

image image

ozh commented 4 years ago

Closing without updating docs at https://wakatime.com/notepad++ seems a bit off