Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension keeps changing .wakatime-project file #61

Closed
petoem opened this issue Jul 26, 2018 · 4 comments
Closed

Extension keeps changing .wakatime-project file #61

petoem opened this issue Jul 26, 2018 · 4 comments

Comments

@petoem
Copy link

petoem commented Jul 26, 2018

Wakatime vscode extension keeps writing new project name into .wakatime-project.

image

.wakatime.log shows this error:

{
  "now": "2018/07/26 12:57:34 +0200",
  "version": "10.2.1",
  "plugin": "vscode/1.25.1 vscode-wakatime/1.2.3",
  "time": 1532602653.8137739,
  "caller": "/home/petoem/.vscode/extensions/wakatime.vscode-wakatime-1.2.3/out/wakatime-master/wakatime/logger.py",
  "lineno": 62,
  "file": "/home/petoem/Documents/workspace/awesomeproject/.wakatime-project",
  "level": "DEBUG",
  "message": "Traceback (most recent call last):\n  File \"/home/petoem/.vscode/extensions/wakatime.vscode-wakatime-1.2.3/out/wakatime-master/wakatime/stats.py\", line 123, in guess_lexer_using_filename\n    lexer = custom_pygments_guess_lexer_for_filename(file_name, text)\n  File \"/home/petoem/.vscode/extensions/wakatime.vscode-wakatime-1.2.3/out/wakatime-master/wakatime/stats.py\", line 316, in custom_pygments_guess_lexer_for_filename\n    raise ClassNotFound('no lexer for filename %r found' % fn)\npygments.util.ClassNotFound: no lexer for filename '.wakatime-project' found\n"
}

My .wakatime.cfg:

[settings]
debug = true
api_key = 
hide_file_names = true
hide_project_names = true
; include_only_with_project_file = true
offline = true
timeout = 15
hostname = notebook
@alanhamlett
Copy link
Member

The WakaTime plugin only creates that DEBUG log when VS Code triggers these editor events:

vscode.window.onDidChangeTextEditorSelection(this.onChange, this, subscriptions);

Maybe clicking on the .wakatime-project file inside your project folder is triggering those events, or another plugin is causing unopened files to be modified or opened within your project?

@edmondburnett
Copy link

edmondburnett commented Jan 5, 2019

Having the same/similar issue, except with no errors logged in ~/.wakatime.log (this log file exists but is 0 bytes). When hide_project_names is set to true, Wakatime seems to continually generate new project names for the same project in .wakatime-project, resulting in hundreds of new random project names in the dashboard after about an hour and a half of using VS Code.

I'm on macOS 10.13.6 and VS Code 1.30.1, with Wakatime 1.2.5.

wakatime

@alanhamlett
Copy link
Member

Fixed with wakatime/wakatime@8afc6133cf2645d95c0acc84fcddcb5493e508c2 and released just now in v10.7.1. Restarting your VS Code should fix it.

mjbvz added a commit to mjbvz/vscode-wakatime that referenced this issue May 2, 2019
gandarez pushed a commit that referenced this issue May 3, 2019
alanhamlett added a commit that referenced this issue May 3, 2019
@hilleer
Copy link

hilleer commented Sep 14, 2019

I have just set hide_project_names to true today. As a result Wakatime started generating those files as suggested by @edmondburnett...

Its a bit silly to add those to all my project's .gitignore, while I believe it is unexpected behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants