Deluge Source Install - xdg syntaxerror

General support for problems installing or using Deluge
Post Reply
Leegaert
New User
New User
Posts: 3
Joined: Sun Aug 26, 2012 10:21 pm

Deluge Source Install - xdg syntaxerror

Post by Leegaert »

Hello

I have a QNAP-NAS TS-219P+. Since there is no package available for Deluge, I decided to try and install from source.
After lots of searching and trying I've managed to get all the dependencies installed that are listed here under Core.
I thought I didn't need GTK because I won't use the GUI on my NAS itself. I did install the mako package.

After getting all these dependencies, I installed deluge and deluged.
When I try to run deluged I get a syntax error but I don't know what to do now...

Code: Select all

[~] # cd /opt/local/bin
[/opt/local/bin] # ./deluged
[/opt/local/bin] # Traceback (most recent call last):
  File "./deluged", line 8, in <module>
    load_entry_point('deluge==1.3.5-dev', 'console_scripts', 'deluged')()
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/deluge-1.3.5_dev-py2.5.egg/deluge/main.py", line 201, in start_daemon
    open_logfile()
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/deluge-1.3.5_dev-py2.5.egg/deluge/main.py", line 184, in open_logfile
    options.logfile = deluge.configmanager.get_config_dir("deluged.log")
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/deluge-1.3.5_dev-py2.5.egg/deluge/configmanager.py", line 130, in get_config_dir
    return os.path.join(_configmanager.get_config_dir(), filename)
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/deluge-1.3.5_dev-py2.5.egg/deluge/configmanager.py", line 93, in get_config_dir
    return self.config_directory
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/deluge-1.3.5_dev-py2.5.egg/deluge/configmanager.py", line 51, in config_directory
    self.__config_directory = deluge.common.get_default_config_dir()
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/deluge-1.3.5_dev-py2.5.egg/deluge/common.py", line 162, in get_default_config_dir
    import xdg.BaseDirectory
  File "/opt/local/lib/python2.5/site-packages/xdg/BaseDirectory.py", line 58
    os.makedirs(path, 0o700)
                          ^
SyntaxError: invalid syntax
Could someone possibly help me with this error? I'd really like to get this thing running, I've put a lot of effort in it and Transmission really isn't my favourite torrent client.

Thanks in advance for helping me out!
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge Source Install - xdg syntaxerror

Post by Cas »

Replace 0o700 with 0700 in /opt/local/lib/python2.5/site-packages/xdg/BaseDirectory.py

It looks like a commit for python 3 compatibility which will only work with >=python 2.6 (i.e. not python 2.5).
Leegaert
New User
New User
Posts: 3
Joined: Sun Aug 26, 2012 10:21 pm

Re: Deluge Source Install - xdg syntaxerror

Post by Leegaert »

Thanks for the reply!

That did the trick ;) unfortunately I'm having some problems with the libtorrent installation.
This installation is too hard for me, to get deluge installed on my NAS it's incredible!

Thanks anyway for your help!
Leegaert
New User
New User
Posts: 3
Joined: Sun Aug 26, 2012 10:21 pm

Re: Deluge Source Install - xdg syntaxerror

Post by Leegaert »

I managed to install libtorrent correctly now.

However I bumbed into another error while recompiling deluge.

Code: Select all

/share/MD0_DATA/.qpkg/Optware/bin/../lib/gcc/../../include/boost/preprocessor/iteration/detail/local.hpp:79:   instantiated from here
/share/MD0_DATA/.qpkg/Optware/bin/../lib/gcc/../../include/boost/python/detail/make_tuple.hpp:25: error: 'PyTuple_SET_ITEM' was not declared in this scope
/share/MD0_DATA/.qpkg/Optware/bin/../lib/gcc/../../include/boost/python/object_core.hpp: In constructor 'boost::python::api::object::object(const T&) [with T = boost::python::tuple]':
/share/MD0_DATA/.qpkg/Optware/bin/../lib/gcc/../../include/boost/python/numeric.hpp:121:   instantiated from 'void boost::python::numeric::array::resize(const Sequence&) [with Sequence = boost::python::tuple]'
/share/MD0_DATA/.qpkg/Optware/bin/../lib/gcc/../../include/boost/preprocessor/iteration/detail/local.hpp:37:   instantiated from here
/share/MD0_DATA/.qpkg/Optware/bin/../lib/gcc/../../include/boost/python/object_core.hpp:334: error: 'object_base_initializer' was not declared in this scope
error: command 'gcc' failed with exit status 1
These are the last lines from the output.
Do you have an idea what might've caused this?

The boost version I've installed is 1.51.0, libtorrent rasterbar 0.16.3.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Deluge Source Install - xdg syntaxerror

Post by Cas »

If you have installed libtorrent and python bindings then nothing should compile when building deluge. If deluge is trying to compile then it is attempting to compile libtorrent because it cannot find it.

Also it is not really recommend to use 0.16 with Deluge 1.3.5 currently.
Post Reply