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
83 stars 31 forks source link

Plugin is logging but not posting to site #4

Closed ChrisHacker closed 9 years ago

ChrisHacker commented 9 years ago

I installed the plugin yesterday. The log output with debug true is not logging to AppData\Roaming\Notepad++\plugins\config\WakaTime The only output in that file i see is this: 1:20:02 PM : WakaTime : ERROR : An exception occured : The operation has timed out. And that's from yesterday. I've since restarted Notepad++ a few times.

What is logged is in USER.wakatime :

{"now": "2015/07/28 10:28:18 Central Daylight Time", "version": "4.1.0", "plugin": "notepadpp/394008 notepadpp-wakatime/2.0.0", "time": 1438097297.220843, "caller": "C:\\Users\\Chris\\AppData\\Roaming\\Notepad++\\plugins\\Config\\wakatime-master\\wakatime\\languages\\__init__.py", "lineno": 99, "file": "C:\\Users\\Chris\\Desktop\\2x ui punchlist.txt", "level": "DEBUG", "message": "Traceback (most recent call last):\n  File \"C:\\Users\\Chris\\AppData\\Roaming\\Notepad++\\plugins\\Config\\wakatime-master\\wakatime\\languages\\__init__.py\", line 93, in __init__\n    module = import_module('.%s' % module_name, package=__package__)\n  File \"C:\\Python34\\lib\\importlib\\__init__.py\", line 109, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 2254, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 2224, in _find_and_load_unlocked\nImportError: No module named 'wakatime.languages.special'\n"}
{"now": "2015/07/28 10:28:41 Central Daylight Time", "version": "4.1.0", "plugin": "notepadpp/394008 notepadpp-wakatime/2.0.0", "time": 1438097321.392413, "caller": "C:\\Users\\Chris\\AppData\\Roaming\\Notepad++\\plugins\\Config\\wakatime-master\\wakatime\\base.py", "lineno": 316, "file": "C:\\Users\\Chris\\Documents\\GitHub\\stdev\\st\\db-migrations\\2015-07-28_100000_title-order-schema-updates.js", "level": "DEBUG", "message": "Sending heartbeat to api at https://wakatime.com/api/v1/heartbeats"}
{"now": "2015/07/28 10:28:41 Central Daylight Time", "version": "4.1.0", "plugin": "notepadpp/394008 notepadpp-wakatime/2.0.0", "time": 1438097321.392413, "caller": "C:\\Users\\Chris\\AppData\\Roaming\\Notepad++\\plugins\\Config\\wakatime-master\\wakatime\\base.py", "lineno": 344, "file": "C:\\Users\\Chris\\Documents\\GitHub\\stdev\\st\\db-migrations\\2015-07-28_100000_title-order-schema-updates.js", "level": "DEBUG", "message": {"time": 1438097321.392413, "language": "JavaScript", "lines": 16, "branch": "alpha", "entity": "C:\\Users\\Chris\\Documents\\GitHub\\stdev\\st\\db-migrations\\2015-07-28_100000_title-order-schema-updates.js", "project": "st", "type": "file"}}
{"now": "2015/07/28 10:28:43 Central Daylight Time", "version": "4.1.0", "plugin": "notepadpp/394008 notepadpp-wakatime/2.0.0", "time": 1438097323.110631, "caller": "C:\\Users\\Chris\\AppData\\Roaming\\Notepad++\\plugins\\Config\\wakatime-master\\wakatime\\languages\\__init__.py", "lineno": 99, "isWrite": true, "file": "C:\\Users\\Chris\\Documents\\GitHub\\stdev\\st\\db-migrations\\2015-07-28_100000_title-order-schema-updates.js", "level": "DEBUG", "message": "Traceback (most recent call last):\n  File \"C:\\Users\\Chris\\AppData\\Roaming\\Notepad++\\plugins\\Config\\wakatime-master\\wakatime\\languages\\__init__.py\", line 93, in __init__\n    module = import_module('.%s' % module_name, package=__package__)\n  File \"C:\\Python34\\lib\\importlib\\__init__.py\", line 109, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n  File \"<frozen importlib._bootstrap>\", line 2254, in _gcd_import\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\n  File \"<frozen importlib._bootstrap>\", line 2224, in _find_and_load_unlocked\nImportError: No module named 'wakatime.languages.javascript'\n"}```
alanhamlett commented 9 years ago

So you don't have any logged time showing up in your dashboard from Notepad++?

That operation has timed out message is from WakaTime/WakaTime.cs#L75. It could be happening when downloading Python or when downloading wakatime cli. I should catch that exception further down so we can be sure which code is causing it.

Either way, it looks like python and wakatime cli have been downloaded because that's the only way you can get those log messages in your USER.wakatime.log file.

The problem seems to be in wakatime cli, because we aren't seeing a 201 response from the api when sending a heartbeat. The Sending heartbeat to api... message shows it sent the heartbeat, but it didn't get a response.

Are you by chance behind a proxy?

ChrisHacker commented 9 years ago

Alan

Thanks for getting back. After a few more times closing and restarting N++ over the course of the day, it has started to report to the API.

alanhamlett commented 9 years ago

Ok, glad it's working now.