# Cannot start deluge



## tim-m89 (May 24, 2014)

Here's what happens when I try to start deluge from a terminal. Recompiled deluge and all its direct dependencies didn't fix it. Any ideas?:


```
% deluge

** (deluge:94059): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (deluge:94059): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (deluge:94059): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
Traceback (most recent call last):
  File "/usr/local/bin/deluge", line 9, in <module>
    load_entry_point('deluge==1.3.6', 'gui_scripts', 'deluge')()
  File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/main.py", line 132, in start_ui
    UI(options, args, options.args)
  File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/ui.py", line 150, in __init__
    ui = GtkUI(args)
  File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/gtkui/gtkui.py", line 225, in __init__
    self.ipcinterface = IPCInterface(args)
  File "/usr/local/lib/python2.7/site-packages/deluge-1.3.6-py2.7.egg/deluge/ui/gtkui/ipcinterface.py", line 130, in __init__
    os.kill(int(os.readlink(lockfile)), 0)
ValueError: invalid literal for int() with base 10: ''
```


----------



## SirDice (May 26, 2014)

It looks like it has an issue with your installed Python. What version do you have installed?


----------



## youngunix (Jun 2, 2014)

If you are able to build it, then you have the required ports/packages to do so. Yet, do you have the required ones to run it? You can check your installed ports/packages against the ones required to run it 'net-p2p/deluge' and see if you are missing any (install as needed).


----------



## tim-m89 (Jun 29, 2014)

The actual error that is hit, line 130 of ipcinterface.py seems like bad code that may have not been tested:


```
if os.path.lexists(lockfile):
                try:
                    os.kill(int(os.readlink(lockfile)), 0)
```
...when you consider the return values of the api used by I'm no python expert. I tried making sure the lockfile didn't exist by running this:


```
% rm -R ~/.config/deluge/ipc
```

And now my deluge starts ok.  :e


----------

