wakatime / vim-wakatime

Vim plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/vim
BSD 3-Clause "New" or "Revised" License
1.01k stars 69 forks source link

Fix parsing extra heartbeats: invalid character 'U' in string escape code #180

Open alanhamlett opened 1 year ago

alanhamlett commented 1 year ago

Logs:

{"caller":"cmd/params/params.go:401","func":"params.LoadHeartbeatParams","level":"error","message":"failed to read extra heartbeats: failed parsing: failed to json decode from data \"[{\\\"entity\\\": \\\"C:\\\\Users\\\\pikac\\\\AppData\\\\Local\\\\nvim\\\\lua\\\\plugins\\\\termdebug.lua\\\", \\\"timestamp\\\": 1676881606, \\\"is_write\\\": true, \\\"alternate_language\\\": \\\"lua\\\"}]\\n\": invalid character 'U' in string escape code","now":"2023-02-20T18:56:46+10:30","os/arch":"windows/amd64","version":"v1.66.0"}

Related to wakatime/wakatime-cli#797, but might be a bug in vim-wakatime's JSON rendering.

Originally reported in https://github.com/wakatime/vim-wakatime/issues/156.

alanhamlett commented 4 months ago

It might be fixed with a4c66faea1eca47dce7c7c3586332f75cfbe9edf. @Xanthus58 can you check?