wakatime / eclipse-wakatime

Eclipse plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/eclipse
BSD 3-Clause "New" or "Revised" License
174 stars 16 forks source link

Not logging time after entering api key #4

Closed alanhamlett closed 8 years ago

alanhamlett commented 9 years ago

Copied from reddit:

Hello everyone, I am a freelance coder and I need to be able to track my time per project in Eclipse Luna. After a lot of searching, I found WakaTime. Unfortunately, it does not seem to work. I entered my api key (and double checked it's correct) and coded for about an hour. When I checked the website it said I had logged 0 minutes. I have tried reinstalling eclipse, but it did not fix anything. Any suggestions for what to do?

alanhamlett commented 9 years ago

What OS are you using?

EliasWatson commented 9 years ago

Windows 7 Home Premium x64 Eclipse Luna 4.4.2 Java 8 Update 40 and Java 7 Update 79 (Eclipse is using Java 7)

alanhamlett commented 9 years ago

Are there any errors in your Eclipse Error Log window?

How about any errors in your $HOME/.wakatime.log file?

EliasWatson commented 9 years ago

Eclipse log file: http://hastebin.com/xurelodani.coffee I can't seem to find the wakatime log file, I searched my computer for that file name and it doesn't exist.

alanhamlett commented 9 years ago

It should be at C:\Users\Assossa\.wakatime.log. Since it doesn't exist, the plugin was never calling wakatime cli. I think I've fixed the issue after noticing the path to python was hard-coded instead of using the detected location of python on your system:

wakatime/eclipse-wakatime@5e66d005a7d1549f744ddd627cf9b09660d4026a

netpoe commented 9 years ago

Hi, I'm using this open issue to post this .wakatime.log:

TypeError: send_heartbeat() got multiple values for keyword argument 'project'

Wakatime stopped logging the last time I turned off my computer. Using: Mac Book Air mid-2013, Yosemite 10.10.3

alanhamlett commented 9 years ago

@netpoe that was a bug in wakatime cli. It's fixed now, but wakatime cli won't update unless you reinstall the plugin for Eclipse.

EliasWatson commented 9 years ago

The plugin still does not work for me. I have Python 2.7.9 x64, and there is no wakatime log.

alanhamlett commented 9 years ago

What location is python installed to, and can you get that from the cmd line by running:

which python

hllinc commented 9 years ago

Hi, Alan! Think you very much for your timely email replay. It is my fault. Since I have not used Python, I didn't add python's home directory to my computer's system environment path. So now Waka have worked well. By the way, this plugin is fantastic! Thank you!

isortegah commented 8 years ago
{"now": "2016/07/20 09:45:59 Central Daylight Time (Mexico)", "version": "6.0.7", "plugin": "eclipse/4.4.0.v20140925-0400 eclipse-wakatime/3.0.1", "time": 1469025959.399, "level": "ERROR", "message": "Traceback (most recent call last):
  File \"C:\\Users\\Ivansebastian\\eclipse\\configuration\\org.eclipse.osgi\\611\\0\\.cp\\wakatime-master\\wakatime\\main.py\", line 533, in execute
    retval = process_heartbeat(args, configs, hostname, heartbeat)
  File \"C:\\Users\\Ivansebastian\\eclipse\\configuration\\org.eclipse.osgi\\611\\0\\.cp\\wakatime-master\\wakatime\\main.py\", line 492, in process_heartbeat
    alternate_language=heartbeat.get('alternate_language'))
  File \"C:\\Users\\Ivansebastian\\eclipse\\configuration\\org.eclipse.osgi\\611\\0\\.cp\\wakatime-master\\wakatime\\stats.py\", line 173, in get_file_stats
    language, lexer = guess_language(file_name)
  File \"C:\\Users\\Ivansebastian\\eclipse\\configuration\\org.eclipse.osgi\\611\\0\\.cp\\wakatime-master\\wakatime\\stats.py\", line 41, in guess_language
    language = get_language_from_extension(file_name)
  File \"C:\\Users\\Ivansebastian\\eclipse\\configuration\\org.eclipse.osgi\\611\\0\\.cp\\wakatime-master\\wakatime\\stats.py\", line 129, in get_language_from_extension
    if os.path.exists(u('{0}{1}').format(u(filepart), u('.c'))) or os.path.exists(u('{0}{1}').format(u(filepart), u('.C'))):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf3 in position 67: ordinal not in range(128)
"}
alanhamlett commented 8 years ago

@isortegah can you replace line 129 in file C:\Users\Ivansebastian\eclipse\configuration\org.eclipse.osgi\611\0\.cp\wakatime-master\wakatime\stats.py with:

if os.path.exists(filepart + '.c') or os.path.exists(filepart + '.C'):

Does it fix the bug?

Also, what is the full path of the file you were editing at the time of this error?

P.S. Next time please open a new issue instead of commenting on a closed unrelated issue.