Giter Site home page Giter Site logo

Comments (5)

alanhamlett avatar alanhamlett commented on July 19, 2024

@stoutZero can you try running this terminal command:

pythonw "~/.vscode/extensions/WakaTime.vscode-wakatime-1.1.13/out/wakatime-master/wakatime/cli.py" --file "~PROJECT/package.json" --plugin "vscode/1.15.1 vscode-wakatime/1.1.13" --alternate-project "~PROJECT"

When you previously manually ran the command, the plugin argument was parsed as two arguments instead of one because of the space. Let's see if the above command produces an error.

from vscode-wakatime.

dgrebb avatar dgrebb commented on July 19, 2024

When run manually in terminal, the command appears to succeed. What's strange is no time ever registers in Wakatime Dashboard. Is there a way to run the command verbose?

Edit: this command only seems to fail in VS Code developer console.

PS: The extension seems to work fine in Windows. I'm running a VM on my Mac and when I need to work in VS Code on Windows all of my time is logged successfully.

from vscode-wakatime.

alanhamlett avatar alanhamlett commented on July 19, 2024

Is there a way to run the command verbose?

Yes, adding --verbose will print more detailed logs to your ~/.wakatime.log file but it still tries not to print errors to stdout since some editors display any output from plugin processes. If you tail -f ~/.wakatime.log then you should see an api request sent, with either a 201 success or error code response with an error message.

Also, if any other client-side errors occur, such as malformed config file etc, they will also be printed to the log file.

from vscode-wakatime.

dgrebb avatar dgrebb commented on July 19, 2024

Here's what happens every time I run the command.

Additional info: I have the oh-my-zsh plugin set up as well, and the same error happens every time I use a command in iTerm. This indicates it's not just a VSCode issue.

VSCode errors:

{"now": "2018/02/21 13:07:54 -0500", "version": "10.1.0", "plugin": "vscode/1.20.1 vscode-wakatime/1.1.22", "time": 1519236474.435497, "caller": "/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/logger.py", "lineno": 62, "file": "/path/to/file.jsx", "level": "DEBUG", "message": "Traceback (most recent call last):\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/stats.py\", line 120, in guess_lexer_using_filename\n    lexer = custom_pygments_guess_lexer_for_filename(file_name, text)\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/stats.py\", line 292, in custom_pygments_guess_lexer_for_filename\n    raise ClassNotFound('no lexer for filename %r found' % fn)\nClassNotFound: no lexer for filename 'file.jsx' found\n"}
{"now": "2018/02/21 13:07:54 -0500", "version": "10.1.0", "plugin": "vscode/1.20.1 vscode-wakatime/1.1.22", "time": 1519236474.435497, "caller": "/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/api.py", "lineno": 53, "file": "/path/to/file.jsx", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2018/02/21 13:07:54 -0500", "version": "10.1.0", "plugin": "vscode/1.20.1 vscode-wakatime/1.1.22", "time": 1519236474.435497, "caller": "/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/api.py", "lineno": 59, "file": "/path/to/file.jsx", "level": "DEBUG", "message": "[{'is_write': False, 'entity': u'/path/to/file.jsx', 'dependencies': [], 'language': None, 'lines': 159, 'project': u'ResiPatternLab', 'cursorpos': None, 'lineno': None, 'branch': u'US1268417-HMD-POC-custom-rotuer', 'time': 1519236474.435497, 'type': 'file', 'user_agent': u'wakatime/10.1.0 (Darwin-16.7.0-x86_64-i386-64bit) Python2.7.10.final.0 vscode/1.20.1 vscode-wakatime/1.1.22'}]"}
{"now": "2018/02/21 13:07:55 -0500", "version": "10.1.0", "plugin": "vscode/1.20.1 vscode-wakatime/1.1.22", "time": 1519236474.435497, "caller": "/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/api.py", "lineno": 121, "file": "/path/to/file.jsx", "level": "WARNING", "message": "{'traceback': 'Traceback (most recent call last):\\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/api.py\", line 107, in send_heartbeats\\n    verify=not args.nosslverify)\\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/packages/requests/sessions.py\", line 555, in post\\n    return self.request(\\'POST\\', url, data=data, json=json, **kwargs)\\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/packages/requests/sessions.py\", line 508, in request\\n    resp = self.send(prep, **send_kwargs)\\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/packages/requests/sessions.py\", line 618, in send\\n    r = adapter.send(request, **kwargs)\\n  File \"/Users/username/.vscode/extensions/WakaTime.vscode-wakatime-1.1.22/out/wakatime-master/wakatime/packages/requests/adapters.py\", line 490, in send\\n    raise ConnectionError(err, request=request)\\nConnectionError: (\\'Connection aborted.\\', error(54, \\'Connection reset by peer\\'))\\n', 'ConnectionError': u\"('Connection aborted.', error(54, 'Connection reset by peer'))\"}"}

ZSH plugin errors:

{"now": "2018/02/21 13:13:55 -0500", "version": "10.1.0", "plugin": "zsh-wakatime/0.0.1", "time": 1519236835.489413, "caller": "/Library/Python/2.7/site-packages/wakatime/api.py", "lineno": 53, "is_write": true, "file": "gst", "level": "DEBUG", "message": "Sending heartbeats to api at https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"}
{"now": "2018/02/21 13:13:55 -0500", "version": "10.1.0", "plugin": "zsh-wakatime/0.0.1", "time": 1519236835.489413, "caller": "/Library/Python/2.7/site-packages/wakatime/api.py", "lineno": 59, "is_write": true, "file": "gst", "level": "DEBUG", "message": "[{'is_write': True, 'entity': u'gst', 'dependencies': [], 'language': None, 'lines': None, 'project': u'Terminal', 'cursorpos': None, 'lineno': None, 'branch': None, 'time': 1519236835.489413, 'type': 'app', 'user_agent': u'wakatime/10.1.0 (Darwin-16.7.0-x86_64-i386-64bit) Python2.7.10.final.0 zsh-wakatime/0.0.1'}]"}
{"now": "2018/02/21 13:13:55 -0500", "version": "10.1.0", "plugin": "zsh-wakatime/0.0.1", "time": 1519236835.489413, "caller": "/Library/Python/2.7/site-packages/wakatime/api.py", "lineno": 121, "is_write": true, "file": "gst", "level": "WARNING", "message": "{'traceback': 'Traceback (most recent call last):\\n  File \"/Library/Python/2.7/site-packages/wakatime/api.py\", line 107, in send_heartbeats\\n    verify=not args.nosslverify)\\n  File \"/Library/Python/2.7/site-packages/wakatime/packages/requests/sessions.py\", line 555, in post\\n    return self.request(\\'POST\\', url, data=data, json=json, **kwargs)\\n  File \"/Library/Python/2.7/site-packages/wakatime/packages/requests/sessions.py\", line 508, in request\\n    resp = self.send(prep, **send_kwargs)\\n  File \"/Library/Python/2.7/site-packages/wakatime/packages/requests/sessions.py\", line 618, in send\\n    r = adapter.send(request, **kwargs)\\n  File \"/Library/Python/2.7/site-packages/wakatime/packages/requests/adapters.py\", line 490, in send\\n    raise ConnectionError(err, request=request)\\nConnectionError: (\\'Connection aborted.\\', error(54, \\'Connection reset by peer\\'))\\n', 'ConnectionError': u\"('Connection aborted.', error(54, 'Connection reset by peer'))\"}"}

from vscode-wakatime.

alanhamlett avatar alanhamlett commented on July 19, 2024

Now we're onto it, that error message most commonly occurs when you need a proxy to connect to the internet:
ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer'))

Do you use a proxy?

from vscode-wakatime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.