hamser service fails to start after frest install #61

Closed
nikgul opened this Issue Jan 6, 2013 · 12 comments

6 participants

@nikgul

I'm getting this when I try to start the service from the command line after a fresh install of the git HEAD version, didn't have mutch luck with the latest tag either

$ /usr/lib/hamster-time-tracker/hamster-service
hamster-service up
Traceback (most recent call last):
File "/usr/lib/hamster-time-tracker/hamster-service", line 301, in
storage = Storage(loop)
File "/usr/lib/hamster-time-tracker/hamster-service", line 49, in init
db.Storage.init(self, ("Unsorted"))
File "/usr/lib/python2.7/site-packages/hamster/db.py", line 69, in __init_

self.db_path = self.__init_db_file(database_dir)
File "/usr/lib/python2.7/site-packages/hamster/db.py", line 139, in __init_db_file
copyfile(os.path.join(data_dir, 'hamster.db'), db_path)
File "/usr/lib64/python2.7/shutil.py", line 117, in copy
copyfile(src, dst)
File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/usr/share/hamster-applet/hamster.db'

@nextsux

install fails to put clean hamster.db correct place. As a workaround you can download https://github.com/projecthamster/hamster/raw/master/data/hamster.db to ~/.local/share/hamster-applet/hamster.db

@faebser

Different error, same problem and also same solution (just adding it so other users will find the solution easily)

ERROR:dbus.proxies:Introspect error on :1.229:/org/gnome/Hamster: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
Traceback (most recent call last):
  File "/usr/bin/hamster", line 378, in <module>
    getattr(hamster_client, command)(*args)
  File "/usr/bin/hamster", line 189, in start
    end_time = end_time))
  File "/usr/lib/python2.7/dist-packages/hamster/client.py", line 187, in add_fact
    temporary_activity)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.229 was not provided by any .service files
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 96, in apport_excepthook
    dbus_service_unknown_analysis(exc_obj, pr)
  File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 170, in dbus_service_unknown_analysis
    cp = ConfigParser(interpolation=None)
TypeError: __init__() got an unexpected keyword argument 'interpolation'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/hamster", line 378, in <module>
    getattr(hamster_client, command)(*args)
  File "/usr/bin/hamster", line 189, in start
    end_time = end_time))
  File "/usr/lib/python2.7/dist-packages/hamster/client.py", line 187, in add_fact
    temporary_activity)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.229 was not provided by any .service files
@tstriker

humm, when you say fresh install - are you running as specified in the README?

./waf configure build --prefix=/usr
sudo ./waf install

@faebser

yes, i cloned the repo and just followed the explanations outlined in the readme.

@tstriker

hmm, strange, can't reproduce

@faebser

can I help you with some additonal Information?
I also have another strange problem:
with hamster & the gnome shell extension running my xserver or gdm crashes after entering the password on the lockscreen.

@tstriker

the gnome-shell bit is fixed in git master so you can use that https://github.com/projecthamster/shell-extension#readme

@tstriker tstriker closed this in 34cae3b Jan 16, 2013
@klugjohannes

hamster-service still seems to be looking in the wrong directory:

IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/usr/share/hamster-applet/hamster.db'
@klugjohannes

the following patch seems to work:

[johannes@telemachus ~/src/hamster]$ git diff
diff --git a/src/hamster/db.py b/src/hamster/db.py
index c9c4c09..c93f678 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -123,7 +123,7 @@ class Storage(storage.Storage):
             # if not there, copy from the defaults
             try:
                 import defs
-                data_dir = os.path.join(defs.DATA_DIR, "hamster-applet")
+                data_dir = os.path.join(defs.DATA_DIR, "hamster-time-tracker")
             except:
                 # if defs is not there, we are running from sources
                 module_dir = os.path.dirname(os.path.realpath(__file__))
@tstriker tstriker added a commit that referenced this issue Jan 16, 2013
@tstriker tstriker v1.03
 * fix issue #61 - installation was missing initial database for fresh installs
 * loosen backend dependencies so that hamster.client can be used outside the
   project see http://pypi.python.org/pypi/hamster-sqlite/ for details
 * desktop notification now once again correctly notifies of "No activity"

 * updated Bulgarian translation
0f0fe38
@klugjohannes

Hamster applet is now also working as expected with the patch supplied above.

@tstriker

ah, lame me, thank you @klugjohannes !

@lecam-conseil

I had the same problem, caused by a bad symbolic link referencing hamster.db
Creating a new symbolic link to the database resolved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment