Failed installation on QNAP TS-210 NAS which previously worked ok

301 views
Skip to first unread message

Nick Tripp

unread,
Sep 8, 2014, 4:16:48 AM9/8/14
to py...@googlegroups.com
Hi
I have a QNAP TS-210 which was configured as a single disk device, i was running pywws fine on this for over a year. I can't recall the version number of pywws i was running, but i think it was 13.06.
I recently upgraded my NAS to have two Hard drives and this required me to install all the applications again, including pywws. This is when my problems started. I am using a pywws qnap qpkg compiled by a QNAP forum member, which i had used previously with no problem. When i try installing the qpkg it now it fails at 45% and produces the following error in the pip.log. 

[/tmp] # vi /tmp/pywws/pip.log
Downloading/unpacking pywws

  Running setup.py egg_info for package pywws

    /tmp/pip-build-admin/pywws/setup.py:27: Warning: 'with' will become a reserved keyword in Python 2.6

    Traceback (most recent call last):

      File "<string>", line 16, in <module>

      File "/tmp/pip-build-admin/pywws/setup.py", line 27

        with open('src/pywws/__init__.py') as f:

                ^

    SyntaxError: invalid syntax

    Complete output from command python setup.py egg_info:

    /tmp/pip-build-admin/pywws/setup.py:27: Warning: 'with' will become a reserved keyword in Python 2.6

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build-admin/pywws/setup.py", line 27

    with open('src/pywws/__init__.py') as f:

            ^

SyntaxError: invalid syntax

----------------------------------------

Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-admin/pywws

Exception information:
Traceback (most recent call last):
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/pip-1.3.1-py2.5.egg/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/pip-1.3.1-py2.5.egg/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/pip-1.3.1-py2.5.egg/pip/req.py", line 1057, in prepare_files
    req_to_install.run_egg_info()
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/pip-1.3.1-py2.5.egg/pip/req.py", line 236, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/share/MD0_DATA/.qpkg/Optware/local/lib/python2.5/site-packages/pip-1.3.1-py2.5.egg/pip/util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-admin/pywws


I've asked on the qnap community forum and they are unable to help and suggested posting here. 
The dependencies for pywws are installed via Optware and this is the full list of everything that is installed. 
Would appreciate any help in trying to solve the problem.

Thanks

Nick

Package list

taskPackageI-VerP-VerCommentDelete
 bash3.2.49-13.2.49-1A bourne style shelldelete
 bzip21.0.6-11.0.6-1Very high-quality data compression programdelete
 cairo1.8.8-21.8.8-2Cairo is a vector graphics library with cross-device output support.delete
 expat2.0.1-12.0.1-1XML Parser librarydelete
 fontconfig2.8.0-02.8.0-0Font configuration librarydelete
 freetype2.3.6-12.3.6-1Free truetype librarydelete
 gconv-modules2.5-12.5-1Provides gconv modules missing from the firmware. These are used by glibc iconv() implementation.delete
 glib2.20.4-12.20.4-1The GLib library of C routines.delete
 gnuplot4.4.4-24.4.4-2Command-line driven interactive data and function plotting utilitydelete
 ice6.3.5cvs20050130-26.3.5cvs20050130-2X inter-client librarydelete
 ipkg-web7-77-7A web frontend for ipkgdelete
 libdb4.2.52-34.2.52-3Berkeley DB Librariesdelete
 libgd2.0.35-62.0.35-6An ANSI C library for the dynamic creation of imagesdelete
 libjpeg6b-36b-3collection of jpeg toolsdelete
 libpng1.2.44-11.2.44-1Portable Network Graphics Librariesdelete
 libstdc++6.0.9-66.0.9-6Standard C++ library, needed for dynamically linked C++ programsdelete
 libusb0.1.12-20.1.12-2Library for interfacing to the USB subsystem.delete
 lua5.1.5-15.1.5-1Lua is a powerful light-weight programming language designed for extending applications.delete
 ncurses5.7-35.7-3NCurses librariesdelete
 ncursesw5.7-25.7-2NCurses libraries with wide char supportdelete
 openssl0.9.8v-20.9.8v-2Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and libraridelete
 pango1.24.4-11.24.4-1GNOME font abstraction librarydelete
 pixman0.15.14-10.15.14-1a library that provides low-level pixel manipulation features such as image compositing and trapezoid rasterizationdelete
 py25-setuptools0.6c11-20.6c11-2Tool to build and distribute Python packages, enhancement to distutils.delete
 py25-usb0.4.1-10.4.1-1PyUSB is a native Python module written in C that provides USB access for it.delete
 python2.5-12.5-1This is a package that sets up the default python.delete
 python252.5.6-22.5.6-2Python is an interpreted, interactive, object-oriented programming language.delete
 readline6.1-26.1-2The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they aredelete
 sqlite3.8.1-13.8.1-1SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.delete
 sudo1.8.4.5-11.8.4.5-1System utility to execute commands as the superuserdelete
 x116.2.1+cvs20050209-36.2.1+cvs20050209-3X protocol librarydelete
 xau0.1.1+cvs20050130-20.1.1+cvs20050130-2X authorization librarydelete
 xdmcp0.1.3+cvs20050130-20.1.3+cvs20050130-2XDMCP protocol librarydelete
 xft2.1.6+cvs20050130-32.1.6+cvs20050130-3X11 client-side font librarydelete
 xrender0.8.4+cvs20050130-40.8.4+cvs20050130-4X render extension librarydelete
 zlib1.2.5-11.2.5-1zlib is a library implementing the 'deflate' compression system.delete

Jim Easterbrook

unread,
Sep 8, 2014, 4:35:57 AM9/8/14
to py...@googlegroups.com
On 08/09/14 09:16, Nick Tripp wrote:
> Hi
> I have a QNAP TS-210 which was configured as a single disk device, i was
> running pywws fine on this for over a year. I can't recall the version
> number of pywws i was running, but i think it was 13.06.
> I recently upgraded my NAS to have two Hard drives and this required me to
> install all the applications again, including pywws. This is when my
> problems started. I am using a pywws qnap qpkg
> <http://forum.qnap.com/viewtopic.php?f=128&t=54137&sid=2c7b0e2b3483279252e924ac671383b1> compiled
> by a QNAP forum member, which i had used previously with no problem. When i
> try installing the qpkg it now it fails at 45% and produces the following
> error in the pip.log.
>
> [/tmp] # vi /tmp/pywws/pip.log
> Downloading/unpacking pywws
>
> Running setup.py egg_info for package pywws
>
> /tmp/pip-build-admin/pywws/setup.py:27: Warning: 'with' will become a
> reserved keyword in Python 2.6
>
> Traceback (most recent call last):
>
> File "<string>", line 16, in <module>
>
> File "/tmp/pip-build-admin/pywws/setup.py", line 27
>
> with open('src/pywws/__init__.py') as f:
>
> ^
>
> SyntaxError: invalid syntax
>
> Complete output from command python setup.py egg_info:
>
> /tmp/pip-build-admin/pywws/setup.py:27: Warning: 'with' will become a
> reserved keyword in Python 2.6

You're running Python 2.5 (Python 2.6 came out in 2008, 2.7 in 2010) but
I accidentally let some more modern Python syntax slip in to the
setup.py script without adding a "from __future__ import with_statement"
line to allow for older versions.

I'll correct future releases of pywws, but what you can do now is to
download a .tar.gz or .zip file from
https://pypi.python.org/pypi/pywws/14.06.1, extract it and then edit
setup.py. Add the "from __future__" line just before the first import
statement, then run "python setup.py build" and "sudo python setup.py
install".

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Nick Tripp

unread,
Sep 8, 2014, 1:01:50 PM9/8/14
to py...@googlegroups.com
Thanks Jim
I have done that and it has fallen over again with another Syntax issue, see below. I See that this is also not valid for 2.5, but i'm not sure how to change it to be compatible

[/share/Qweather] # python setup.py build
Traceback (most recent call last):
  File "setup.py", line 29, in <module>
    exec(f.read())
  File "<string>", line 1
    __version__ = '14.06.1'
                           ^
SyntaxError: invalid syntax

Jim Easterbrook

unread,
Sep 8, 2014, 1:50:21 PM9/8/14
to py...@googlegroups.com
On 08/09/14 18:01, Nick Tripp wrote:
> Thanks Jim
> I have done that and it has fallen over again with another Syntax issue,
> see below. I See that this is also not valid for 2.5, but i'm not sure how
> to change it to be compatible
>
> [/share/Qweather] # python setup.py build
> Traceback (most recent call last):
> File "setup.py", line 29, in <module>
> exec(f.read())
> File "<string>", line 1
> __version__ = '14.06.1'
> ^
> SyntaxError: invalid syntax

This must be a misleading error message. I can't believe that's invalid
syntax, even in Python 2.5 (which I no longer have access to to test).

I suggest you copy the contents of src/pywws/__init.py into setup.py and
remove the lines:

with open('src/pywws/__init__.py') as f:
exec(f.read())

Nick Tripp

unread,
Sep 8, 2014, 4:04:07 PM9/8/14
to py...@googlegroups.com
Thanks for the advice. I have it running with version 13.06 from your website, so will leave it like that for now.  thanks for your help.

Nick Tripp

unread,
Sep 9, 2014, 7:48:32 AM9/9/14
to py...@googlegroups.com
Found this on the net, appears the exec command did change between 2.5 and 3 

Jim Easterbrook

unread,
Sep 9, 2014, 8:06:33 AM9/9/14
to py...@googlegroups.com
On 09/09/14 12:48, Nick Tripp wrote:
> Found this on the net, appears the exec command did change between 2.5 and
> 3
>
> http://python3porting.com/differences.html

Ah, that's it. I'm using it as a function in setup.py - I assume that's
been backported from Python 3 into later versions of Python 2.

Nick Tripp

unread,
Oct 5, 2014, 2:40:38 AM10/5/14
to py...@googlegroups.com
Just installed the latest update under Python 2.5 on my Qnap drive and everything is now working. Thanks for the update.
Reply all
Reply to author
Forward
0 new messages