Open ErikBjare opened 9 years ago
Hello, does this work on OS X yet?
I installed it. But when I try, I get the No module named 'activity'
.
@arjunmayilvaganan No, unfortunately it does not.
I don't currently have access to a Mac with OS X so can't work on it for a while either. Simple support best case scenario Q2 2016 (if no one implements it before me).
ActivityWatch is currently hard to configure as well, many config options are constants or example bootstrapping functions.
Could you please paste the entire stacktrace? Your problem doesn't appear platform specific to me...
@ErikBjare,
Traceback (most recent call last):
File "example.py", line 1, in <module>
import activity
ImportError: No module named 'activity'
and when using activitywatch
Traceback (most recent call last):
File "example.py", line 2, in <module>
import activitywatch
File "/usr/local/lib/python3.5/site-packages/activitywatch-0.1.0-py3.5.egg/activitywatch/__init__.py", line 6, in <module>
from . import watchers
File "/usr/local/lib/python3.5/site-packages/activitywatch-0.1.0-py3.5.egg/activitywatch/watchers/__init__.py", line 6, in <module>
from .osx import OSXWatcher
File "/usr/local/lib/python3.5/site-packages/activitywatch-0.1.0-py3.5.egg/activitywatch/watchers/osx.py", line 3, in <module>
from AppKit import NSWorkspace
ImportError: No module named 'AppKit'
Also, if directly ran as activitywatch
from the terminal,
$ activitywatch
Traceback (most recent call last):
File "/usr/local/bin/activitywatch", line 9, in <module>
load_entry_point('activitywatch==0.1.0', 'console_scripts', 'activitywatch')()
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/usr/local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.5/site-packages/activitywatch-0.1.0-py3.5.egg/activitywatch/__init__.py", line 6, in <module>
from . import watchers
File "/usr/local/lib/python3.5/site-packages/activitywatch-0.1.0-py3.5.egg/activitywatch/watchers/__init__.py", line 6, in <module>
from .osx import OSXWatcher
File "/usr/local/lib/python3.5/site-packages/activitywatch-0.1.0-py3.5.egg/activitywatch/watchers/osx.py", line 3, in <module>
from AppKit import NSWorkspace
ImportError: No module named 'AppKit'
Ah yeah sorry, I must have started some work on the OS X watcher and then not followed through properly. If you want to run it you must first install the pyobjc
package or comment out the code that imports the OS X watcher agent. I think pip install pyobjc
should do the trick (at least according to this). There will probably be more errors down the road, but I'm happy to help with whatever issues you encounter.
I see I've made an error in the example in the README (which is the cause of your ImportError: No module named 'activity'
). I'll correct it right away! (you should import activitywatch
and not activity
).
It should at least run properly now with Python 3.3 and Python 3.4 (with limited functionality, what doesn't work should be evident from the log), unfortunately there is a bug in the pyobjc
package that's on PyPI that prevents it from running with Python 3.5 (a temporary work-around would be to create a virtualenv with Python 3.4).
This isn't high on my priority list since I don't use OS X, but might be a good idea to implement if we want to attract more devs. Shouldn't be too hard.