Difference between revisions of "User:Bourke/escidocadmin"

From MPDLMediaWiki
Jump to navigation Jump to search
Line 50: Line 50:
   552  mkdir src
   552  mkdir src
   553  cd src
   553  cd src
  checkout from subversion here
   554  cp test.cfg dev.cfg
   554  cp test.cfg dev.cfg
   555  ls
   555  ls
Line 55: Line 56:
   557  cp test.cfg dev.cfg
   557  cp test.cfg dev.cfg
   558  vi dev.cfg # changed  framework.host= to localhost
   558  vi dev.cfg # changed  framework.host= to localhost
   559  tg-admin sql create # gets errors.
   559  tg-admin sql create # works after installing sqlite3, sqlite3-dev, rebuilding python256 and virtualenv
   </nowiki>
   </nowiki>


errors as of --[[User:Bourke|Bourke]] 16:20, 10 August 2011 (CEST)
====unit testsests ====
 
problem


   <nowiki>
   <nowiki>
escidcoadmin)bootuser@bourke-vb-ub-sandbox:~/work/escidcoadmin/src/escidocadmin$ tg-admin sql create
  $ nosetests --exclude=twill_test.py
Creating tables at sqlite:///devdata.sqlite
> EEEEE.........
Traceback (most recent call last):
> ======================================================================
  File "/home/bootuser/work/escidcoadmin/bin/tg-admin", line 8, in <module>
> ERROR: escidocadmin.lib.framework_test.test_ua
    load_entry_point('TurboGears==1.0.4.4', 'console_scripts', 'tg-admin')()
> ----------------------------------------------------------------------
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/command/base.py", line 369, in main
> Traceback (most recent call last):
    command.run()
>   File "/home/bootuser/work/escidocadmin/lib/python2.5/site-packages/nose-1.1.2-py2.5.egg/nose/case.py", line 197, in runTest
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/command/base.py", line 97, in run
>     self.test(*self.arg)
    sacommand(command, sys.argv)
> TypeError: test_ua() takes exactly 1 argument (0 given)
  File "<string>", line 5, in sacommand
  </nowiki>
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/TurboGears-1.0.4.4-py2.5.egg/turbogears/command/sacommand.py", line 33, in create
    metadata.create_all()
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/schema.py", line 1241, in create_all
    bind.create(self, checkfirst=checkfirst, tables=tables)
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 699, in create
    self._run_visitor(self.dialect.schemagenerator, entity, connection=connection, **kwargs)
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 729, in _run_visitor
    element.accept_visitor(visitorcallable(conn, **kwargs))
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/schema.py", line 1268, in accept_visitor
    visitor.visit_metadata(self)
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/ansisql.py", line 796, in visit_metadata
    collection = [t for t in metadata.table_iterator(reverse=False, tables=self.tables) if (not self.checkfirst or not self.dialect.has_table(self.connection, t.name, schema=t.schema))]
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/databases/sqlite.py", line 231, in has_table
    while cursor.fetchone() is not None:pass
   File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 1022, in fetchone
     row = self._fetchone_impl()
  File "/home/bootuser/work/escidcoadmin/lib/python2.5/site-packages/SQLAlchemy-0.3.9-py2.5.egg/sqlalchemy/engine/base.py", line 996, in _fetchone_impl
    return self.cursor.fetchone()
pysqlite2.dbapi2.ProgrammingError: Cannot operate on a closed cursor.


</nowiki>
and four more similar. Solution: rename or exclude ./escidocadmin/lib/framework_test.py from the nosetests run - it has a different interface.


=== manual install python 2.5 on ubuntu ===
=== manual install python 2.5 on ubuntu ===

Revision as of 11:14, 11 August 2011

notes on getting escidocadmin running

modifications to existing doc ESciDoc_Admin

Prerequisite for Easy_Install is Setuptools Install link to v0.6c11

Easy_install fails to install turbogears 1.0.3 correctly and leaves dir corrupted. Trying with successor framework pip (simply replace easy_install with pip install, keep old version requirements.

Solution (from Andre)

 $>easy_install -f http://www.turbogears.org/1.0/downloads/1.0.4.4 RuleDispatch

and then turbogears install (with 1.0.4.4)

 $>easy_install  turbogears==1.0.4.4

install sqlite - nightmare

from Turbogears 1.0 database installation cannot install from package as Ubuntu 10.04 Lucid ships Python 2.6.5 as standard. So:

  • Install development tools (gcc, make, etc.). (already installed long ago)
  • Install SQLite and the SQlite development files. (apt-get install sqlite3 libsqlite3-dev)
  • gete a pysqlite tarball for Python 2.5.6 from Google Code repository
  • extract and copy directly under the project directory of the 2.5 virtualenv
  • with virtualenv activated and python2.5 operating run python setup.py build from the extracted pysqlite directory.

Here is the bash history on this last step including the complete setup of the virtualenv

  
  535  virtualenv -p /usr/local/python2.5/bin/python escidcoadmin
  536  cd escidcoadmin/
  537  source bin/activate
  538  easy_install sqlalchemy==0.3.9
  539  easy_install -f http://www.turbogears.org/1.0/downloads/1.0.4.4 RuleDispatch 
  540  easy_install turbogears==1.0.4.4
  541  pwd
  542  ls lib/python2.5/site-packages/
  543  mkdir pysqlite-2.5.6
  544  cd pysqlite-2.5.6/
  545  cp -R ~/Downloads/pysqlite-2.5.6/* .
  546  ls
  547  python -V
  548  python setup.py build
  549  python setup.py install
  550  pwd
  551  cd ..
  552  mkdir src
  553  cd src
  checkout from subversion here
  554  cp test.cfg dev.cfg
  555  ls
  556  cd escidocadmin/
  557  cp test.cfg dev.cfg
  558  vi dev.cfg # changed  framework.host= to localhost
  559  tg-admin sql create # works after installing sqlite3, sqlite3-dev, rebuilding python256 and virtualenv
  

unit testsests

problem

 
  $ nosetests --exclude=twill_test.py
> EEEEE.........
> ======================================================================
> ERROR: escidocadmin.lib.framework_test.test_ua
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/bootuser/work/escidocadmin/lib/python2.5/site-packages/nose-1.1.2-py2.5.egg/nose/case.py", line 197, in runTest
>     self.test(*self.arg)
> TypeError: test_ua() takes exactly 1 argument (0 given)
  

and four more similar. Solution: rename or exclude ./escidocadmin/lib/framework_test.py from the nosetests run - it has a different interface.

manual install python 2.5 on ubuntu

good (but not perfect) link howto manual install python25 on ubuntu lucid

worked, but virtualenv then failed to use the python executable, failed to load zlib.

suggestion andre:

apt-get install zlib11g-dev and remake. worked