Code Monkey home page Code Monkey logo

Comments (13)

rabas avatar rabas commented on June 16, 2024

Can confirm this issue, OS X 10.8.4.

from sublime-wakatime.

alanhamlett avatar alanhamlett commented on June 16, 2024

This is possibly fixed in the latest version 0.2.7, but I haven't been able to reproduce it locally.
@rabas can you please confirm this is fixed?

from sublime-wakatime.

makeev avatar makeev commented on June 16, 2024

It is not fixed on Ubuntu, unfortunately:(

from sublime-wakatime.

rabas avatar rabas commented on June 16, 2024

@alanhamlett No, I'm still getting the same error. Is there anything I can do in order to provide you with more details?

from sublime-wakatime.

alanhamlett avatar alanhamlett commented on June 16, 2024

@rabas can you go to your sublime Packages directory and cd into the WakaTime folder, then run these commands:

$ git pull
$ /usr/bin/python --version
$ /usr/bin/python ./packages/wakatime/wakatime-cli.py --help
$ /usr/bin/python ./packages/wakatime/wakatime-cli.py --time 1 --file ./packages/wakatime/wakatime-cli.py --verbose

Then copy/paste the output from the above commands. Can you also check $HOME/.wakatime.log and copy/paste the last line of that file?

from sublime-wakatime.

jamesmoss avatar jamesmoss commented on June 16, 2024

I'm getting the same problem on OSX 10.8.2 so I ran those commands.

Mossbook-Air:WakaTime james$ /usr/bin/python --version
Python 2.7.2
Mossbook-Air:WakaTime james$ /usr/bin/python ./packages/wakatime/wakatime-cli.py --help
usage: wakatime-cli.py [-h] --file file [--time time] [--endtime ENDTIME]
                       [--write] [--plugin PLUGIN] [--key KEY]
                       [--logfile LOGFILE] [--config CONFIG] [--verbose]
                       [--version]

Wakati.Me event api appender

optional arguments:
  -h, --help         show this help message and exit
  --file file        absolute path to file for current action
  --time time        optional floating-point unix epoch timestamp; uses
                     current time by default
  --endtime ENDTIME  optional end timestamp turning this action into a
                     duration; if a non-duration action occurs within a
                     duration, the duration is ignored
  --write            note action was triggered from writing to a file
  --plugin PLUGIN    optional text editor plugin name and version for User-
                     Agent header
  --key KEY          your wakati.me api key; uses api_key from
                     ~/.wakatime.conf by default
  --logfile LOGFILE  defaults to ~/.wakatime.log
  --config CONFIG    defaults to ~/.wakatime.conf
  --verbose          turns on debug messages in log file
  --version          show program's version number and exit
Mossbook-Air:WakaTime james$ /usr/bin/python ./packages/wakatime/wakatime-cli.py --time 1 --file ./packages/wakatime/wakatime-cli.py --verbose
Mossbook-Air:WakaTime james$ tail ~/.wakatime.log
/usr/bin/python: can't find '__main__' module in '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py'
/usr/bin/python: can't find '__main__' module in '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py'
/usr/bin/python: can't find '__main__' module in '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py'
/usr/bin/python: can't find '__main__' module in '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py'
/usr/bin/python: can't find '__main__' module in '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py'
/usr/bin/python: can't find '__main__' module in '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py'
python: can't open file '/Users/james/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime-cli.py': [Errno 2] No such file or directory
{"now": "Tue Jul 23 10:50:10 BST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/james/Library/Application Support/Sublime Text 3/Packages/WakaTime/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": "Sending action to api at https://www.wakati.me/api/v1/actions"}
{"now": "Tue Jul 23 10:50:10 BST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/james/Library/Application Support/Sublime Text 3/Packages/WakaTime/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": {"project": "WakaTime", "tags": ["master", "sublime-wakatime", "WakaTime"], "file": "/Users/james/Library/Application Support/Sublime Text 3/Packages/WakaTime/packages/wakatime/wakatime-cli.py", "time": 1.0}}
{"now": "Tue Jul 23 10:50:11 BST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/james/Library/Application Support/Sublime Text 3/Packages/WakaTime/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": {"response_code": 201, "response_content": "{\n  \"data\": {\n    \"id\": \"2860494b-d9d8-4b44-8586-d09c99226cae\"\n  }\n}"}}

from sublime-wakatime.

jamesmoss avatar jamesmoss commented on June 16, 2024

Also even after running /usr/bin/python ./packages/wakatime/wakatime-cli.py --time 1 --file ./packages/wakatime/wakatime-cli.py --verbose and getting a 201 response I'm not seeing any time in my account.

from sublime-wakatime.

rabas avatar rabas commented on June 16, 2024

I'm using ST3, so I unzipped Wakatime.sublime-package found in Installed Packages dir, and run those commands with extracted files.

➜  wakatime git:(master) ✗ /usr/bin/python --version
Python 2.7.2
➜  wakatime git:(master) ✗ /usr/bin/python ./wakatime-cli.py --help 
usage: wakatime-cli.py [-h] --file file [--time time] [--endtime ENDTIME]
                       [--write] [--plugin PLUGIN] [--key KEY]
                       [--logfile LOGFILE] [--config CONFIG] [--verbose]
                       [--version]

Wakati.Me event api appender

optional arguments:
  -h, --help         show this help message and exit
  --file file        absolute path to file for current action
  --time time        optional floating-point unix epoch timestamp; uses
                     current time by default
  --endtime ENDTIME  optional end timestamp turning this action into a
                     duration; if a non-duration action occurs within a
                     duration, the duration is ignored
  --write            note action was triggered from writing to a file
  --plugin PLUGIN    optional text editor plugin name and version for User-
                     Agent header
  --key KEY          your wakati.me api key; uses api_key from
                     ~/.wakatime.conf by default
  --logfile LOGFILE  defaults to ~/.wakatime.log
  --config CONFIG    defaults to ~/.wakatime.conf
  --verbose          turns on debug messages in log file
  --version          show program's version number and exit
➜  wakatime git:(master) ✗ /usr/bin/python ./wakatime-cli.py --time 1 --file ./packages/wakatime/wakatime-cli.py --verbose

Last few lines in .wakatime.log are:

/usr/bin/python: can't find '__main__' module in '/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/packages/wakatime/wakatime.py'
{"now": "Tue Jul 23 12:23:46 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/packages/wakatime/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": "File does not exist; ignoring this action."}

Edit: Here are some new lines from log:

{"now": "Tue Jul 23 13:11:34 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": "Sending action to api at https://www.wakati.me/api/v1/actions"}
{"now": "Tue Jul 23 13:11:34 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": {"project": "rabas", "tags": ["rabas"], "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "time": 1.0}}
{"now": "Tue Jul 23 13:11:36 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": {"response_code": 201, "response_content": "{\n  \"data\": {\n    \"id\": \"f4e28585-1a25-49de-888e-d558debf2136\"\n  }\n}"}}
{"now": "Tue Jul 23 13:13:32 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": "Sending action to api at https://www.wakati.me/api/v1/actions"}
{"now": "Tue Jul 23 13:13:32 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": {"project": "rabas", "tags": ["rabas"], "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "time": 1.0}}
{"now": "Tue Jul 23 13:13:33 CEST 2013", "version": "0.1.4", "time": 1.0, "file": "/Users/rabas/Library/Application Support/Sublime Text 3/Installed Packages/extracted/packages/wakatime/wakatime-cli.py", "level": "DEBUG", "message": {"response_code": 201, "response_content": "{\n  \"data\": {\n    \"id\": \"f40cde08-ab73-4719-8cef-1125f97ca347\"\n  }\n}"}}

from sublime-wakatime.

rabas avatar rabas commented on June 16, 2024

I just installed plugin on ST2, and it seems to be working, so the issue is related to ST3 only.

Edit:

Removed package form Package Control, downloaded .zip from github, and moved unzipped package to Packages, folder, and it seems to be working now (ST3).

from sublime-wakatime.

alanhamlett avatar alanhamlett commented on June 16, 2024

Ok, I know what's going on now. WakaTime gets installed as a sublime-package archive, but needs to be fully extracted as source code (not .pyc files) into the Packages directory to work.

I posted a question here to see if anyone knows how to force Sublime Text 3 to always extract .sublime-package archives:
http://www.sublimetext.com/forum/viewtopic.php?f=6&t=13427

Sublime Text 2 always extracts the package into the Packages folder, so this error only occurs on ST3 correct?

For now, you can manually extract the WakaTime.sublime-package into the Packages folder to get it working.

from sublime-wakatime.

alanhamlett avatar alanhamlett commented on June 16, 2024

Fixed as of b944863.

Adding a .no-sublime-package file to the repository forces ST3 to extract the plugin into the Packages directory.
Updating WakaTime from these instructions will fix this issue:
https://www.wakati.me/help/plugins/sublime#upgrade

from sublime-wakatime.

alanhamlett avatar alanhamlett commented on June 16, 2024

For anyone who experienced this issue, you will need to manually delete WakaTime.sublime-package and re-install using these instructions:

  1. Run rm -rf $HOME/Library/Application Support/Sublime Text 3/Installed Packages/WakaTime.sublime-package/

  2. Edit your Sublime Package Control list of installed packages to make sure WakaTime is not listed:

    $HOME/Library/Application Support/Sublime Text 3/Packages/User/Package Control.sublime-settings

  3. Re-install WakaTime using Sublime Package Control with these instructions:
    https://www.wakati.me/help/plugins/sublime#package-control-install

from sublime-wakatime.

alanhamlett avatar alanhamlett commented on June 16, 2024

Huh? O_o

from sublime-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.