Wiithon does not start

Bug #503143 reported by juanito
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wiithon
Fix Released
Undecided
Unassigned

Bug Description

El error me deba en ubuntu jaunty, pero actualice a karmic y continua

Gracias de antemano

juanio@influenza:~/wiithon$ more /tmp/wiithon_debug.log
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
kernel: 2.6.31-16-generic
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"juanio@influenza:~/wiithon$ more /tmp/wiithon_debug.log

LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
================================================================
INFO:sqlalchemy.engine.base.Engine.0x...32cc:PRAGMA table_info("online_features")
INFO:sqlalchemy.engine.base.Engine.0x...32cc:()
INFO:sqlalchemy.engine.base.Engine.0x...32cc:ROLLBACK
Traceback (most recent call last):
  File "/usr/games/wiithon", line 17, in <module>
    from preferencias import Preferencias
  File "/usr/share/wiithon/preferencias.py", line 11, in <module>
    from wiitdb_schema import Preferencia
  File "/usr/share/wiithon/wiitdb_schema.py", line 501, in <module>
    util.crearBDD(Base.metadata)
  File "/usr/share/wiithon/util.py", line 399, in crearBDD
    metadatos.create_all(db)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py", line 1765, in create_all
    bind.create(self, checkfirst=checkfirst, tables=tables)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/engine/base.py", line 1129, in create
    self._run_visitor(self.dialect.schemagenerator, entity, connection=connection, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/engine/base.py", line 1158, in _run_visitor
    visitorcallable(self.dialect, conn, **kwargs).traverse(element)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/sql/visitors.py", line 89, in traverse
    return traverse(obj, self.__traverse_options__, self._visitor_dict)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/sql/visitors.py", line 200, in traverse
    return traverse_using(iterate(obj, opts), obj, visitors)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/sql/visitors.py", line 194, in traverse_using
    meth(target)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/sql/compiler.py", line 795, in visit_metadata
    collection = [t for t in sql_util.sort_tables(tables) if self._can_create(t)]
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/sql/compiler.py", line 788, in _can_create
    return not self.checkfirst or not self.dialect.has_table(self.connection, table.name, schema=table.schema)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/databases/sqlite.py", line 443, in has_table
    row = cursor.fetchone()
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/engine/base.py", line 1668, in fetchone
    self.connection._handle_dbapi_exception(e, None, None, self.cursor, self.context)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/engine/base.py", line 931, in _handle_dbapi_exception
    raise exc.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) Cannot operate on a closed cursor. None None

- Wiithon GUI never started
- The error is the same on the apt-version or compiling from development version
- The database file exists but always is 0 bytes

Revision history for this message
juanito (jferiago) wrote :

As an additional note, deleting the config directory does not fix the problem

Revision history for this message
Carlo Mandelli (camandel) wrote :

What sqlalchemy version are you using?

dpkg -l python-sqlalchemy

http://packages.ubuntu.com/karmic/python-sqlalchemy

Revision history for this message
juanito (jferiago) wrote :

$ dpkg -l python-sqlalchemy
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-======================================-======================================-============================================================================================
ii python-sqlalchemy 0.5.5-1 SQL toolkit and Object Relational Mapper for Python

Revision history for this message
Carlo Mandelli (camandel) wrote :

I can't replicate your problem.
Could you uninstall it (--purge), reinstall the lastest devel version, then run wiithon_debug.sh and add as attachment wiithon_debug.log file?

Revision history for this message
juanito (jferiago) wrote :
Download full text (42.5 KiB)

Same results, are there a way to test if sqlalchemy is can create databases by hand? I have no experience in Python :(

Thanks

feria@influenza:~/wiithon$ sudo make uninstall
[sudo] password for feria:
==================================================================
Ignore next errors
==================================================================
rm -f /usr/share/locale/es_CA/LC_MESSAGES/wiithon.mo
==================================================================
Clean old installs
==================================================================
rm -f /usr/games/wiithon_wrapper
rm -f /usr/games/wiithon_unrar
rm -f /usr/games/wiithon_wbfs_file
rm -f /usr/games/wiithon_wdf2iso
rm -f /usr/games/wiithon_iso2wdf
rm -f /usr/games/wiithon_wwt
rm -f /usr/share/wiithon/*.py
rm -f /usr/share/wiithon/*.pyc
rm -f /usr/share/wiithon/*.sh
rm -f /usr/share/wiithon/recursos/glade/*.ui
rm -f /usr/share/wiithon/recursos/imagenes/*.png
rm -f /usr/share/wiithon/recursos/imagenes/*.gif
rm -f /usr/share/wiithon/recursos/imagenes/accesorio/*.jpg
rm -f /usr/share/wiithon/recursos/donate.html
rmdir /usr/share/wiithon/recursos/imagenes/accesorio/
rmdir /usr/share/wiithon/recursos/glade/
rm -f /usr/share/locale/en/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/es/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/da_DK/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/fi_FI/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/it/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/ko_KR/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/nl_NL/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/pt_PT/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/sv_SE/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/de/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/fr/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/ja_JP/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/nb_NO/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/pt_BR/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/ru_RU/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/tr_TR/LC_MESSAGES/wiithon.mo
rm -f /usr/share/locale/ca_ES/LC_MESSAGES/wiithon.mo
rm -f /usr/share/man/man1/wiithon.1.gz
rm -f /usr/share/man/es/man1/wiithon.1.gz
rm -f /usr/share/applications/wiithon_usuario.desktopferia@influenza:~/wiithon$ sudo make uninstall
[sudo] password for feria:
==================================================================
Ignore next errors
==================================================================
rm -f /usr/share/locale/es_CA/LC_MESSAGES/wiithon.mo
==================================================================
Clean old installs
==================================================================
rm -f /usr/games/wiithon_wrapper
rm -f /usr/games/wiithon_unrar
rm -f /usr/games/wiithon_wbfs_file
rm -f /usr/games/wiithon_wdf2iso
rm -f /usr/games/wiithon_iso2wdf
rm -f /usr/games/wiithon_wwt
rm -f /usr/share/wiithon/*.py
rm -f /usr/share/wiithon/*.pyc
rm -f /usr/share/wiithon/*.sh
rm -f /usr/share/wiithon/recursos/glade/*.ui
rm -f /usr/share/wiithon/recursos/imagenes/*.png
rm -f /usr/share/wiithon/recursos/imagenes/*.gif
rm -f /usr/share/wiithon/recursos/imagenes/accesorio/*.jpg
rm -f /usr/share/wiithon/recursos/donate.html
rmdir /usr/share/wiith...

Revision history for this message
Ricardo Marmolejo García (makiolo) wrote :

Vaya tu caso parece raro, por algúna razón no te crea la base de datos el sqlalchemy. Tendré que hacer más output en el debug para concretar más, pero de momento me podrías decir la salida de este comado:

dpkg -l *sqlite*

En principio sqlite no es dependencia pero sqlalchemy utiliza el sqlite para crear la base de datos, y podría faltarte el paquete "sqlite3" (rarisimo, ya que muchos programas lo tienen como dependencia).

Un saludo.

Revision history for this message
juanito (jferiago) wrote :
Download full text (7.7 KiB)

Te envio las salidas de los comandos, para descartar que fuera conficto con la "sqlite", intnente desisnstalarla dejando solo "sqlite3", obteniendo el mismo error :(

feria@influenza:~$ dpkg -l *sqlite*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
un libgda3-sqlite <none> (no description available)
un libgda4-sqlite <none> (no description available)
ii libmono-sqlite 2.4.2.3+dfsg-2 Mono Sqlite library (for CLI 2.0)
un libqt4-sql-sql <none> (no description available)
un libqt4-sql-sql <none> (no description available)
ii libsqlite0 2.8.17-6build1 SQLite shared library
ii libsqlite3-0 3.6.16-1ubuntu SQLite 3 shared library
un python-pysqlit <none> (no description available)
ii python-pysqlit 2.5.5-1ubuntu1 Python interface to SQLite 3
un python-pysqlit <none> (no description available)
un python-pysqlit <none> (no description available)
un python-sqlite <none> (no description available)
un python2.3-pysq <none> (no description available)
un python2.4-pysq <none> (no description available)
un python2.5-pysq <none> (no description available)
un python2.6-pysq <none> (no description available)
ii sqlite 2.8.17-6build1 command line interface for SQLite
un sqlite-doc <none> (no description available)
ii sqlite3 3.6.16-1ubuntu A command line interface for SQLite 3
un sqlite3-doc <none> (no description available)
feria@influenza:~$

feria@influenza:~$ sudo apt-get remove sqlite
[sudo] password for feria:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libpar2-0 binutils-static python-qt3
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  sqlite
0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.
After this operation, 86.0kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 180727 files and directories currently installed.)
Removing sqlite ...
Processing triggers for man-db ...
feria@influenza:~$ dpkg -l *sqlite*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-======================================-======================================-============================================================================================
un libgda3-sqlite <none> (no description available)
un libgda4-sqlite <none> (no description available)
ii libmono-sqlite2.0-cil 2.4.2.3+dfsg-2 ...

Read more...

Revision history for this message
Carlo Mandelli (camandel) wrote :

Very strange problem....try to manually create wiithon db:

zcat wiithon_db.dump.gz | sqllite3 ~/.wiithon/bdd/wiithon_db_ver-4.db

Revision history for this message
juanito (jferiago) wrote :

The table was created manually without problems...

feria@influenza:~/.wiithon/bdd$ sqlite3 ~/.wiithon/bdd/wiithon_db_ver-4.db
SQLite version 3.6.16
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
accesorio rating_content
companie rating_type
genero rating_value
juego rel_accesorio_juego_obligatorio
juego_descripcion rel_accesorio_juego_opcional
juego_wiitdb rel_juego_genero
online_features rel_online_features_juego
particion rel_rating_content_juego
preferencias rom
sqlite>

witthon tries to start, appears the "loading" banner but crashes with this message on a Window (NO errors on console now)

Looks like python cant access sql database... :(

Thanks...

Here is the err...:

cannot create weak reference to 'str' object

Please, inform developers about this error.

Traceback (most recent call last):
  File "/usr/games/wiithon", line 114, in <module>
    App()
  File "/usr/games/wiithon", line 98, in App
    interfaz = WiithonGUI(core, loading)
  File "/usr/share/wiithon/gui.py", line 361, in __init__
    self.refrescarParticionesWBFS()
  File "/usr/share/wiithon/gui.py", line 454, in refrescarParticionesWBFS
    self.refrescarInfoWiiTDB()
  File "/usr/share/wiithon/gui.py", line 1282, in refrescarInfoWiiTDB
    query = session.query(Juego).group_by('idgame')
  File "<string>", line 1, in <lambda>
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py", line 52, in generate
    fn(self, *args[1:], **kw)
  File "<string>", line 1, in <lambda>
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/util.py", line 212, in go
    return fn(*args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py", line 698, in group_by
    criterion = list(chain(*[_orm_columns(c) for c in criterion]))
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/util.py", line 512, in _orm_columns
    mapper, selectable, is_aliased_class = _entity_info(entity)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/util.py", line 483, in _entity_info
    elif _is_mapped_class(entity):
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/util.py", line 589, in _is_mapped_class
    manager = attributes.manager_of_class(cls)
  File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/attributes.py", line 1663, in manager_of_class
    finder = self.manager_finders[cls]
  File "/usr/lib/python2.6/weakref.py", line 243, in __getitem__
    return self.data[ref(key)]
TypeError: cannot create weak reference to 'str' object

Use the following URL for reporting bugs:
https://bugs.launchpad.net/wiithon/+filebug

Revision history for this message
Carlo Mandelli (camandel) wrote :

It seems you are using a local installation of python/sqlalchemy (in /usr/local/lib).
Which version of python are you using?

Revision history for this message
juanito (jferiago) wrote :
Download full text (18.6 KiB)

feria@influenza:~/Desktop$ python -V
Python 2.6.4
feria@influenza:~/Desktop$

feria@influenza:~/Desktop$ whereis python
python: /usr/bin/python2.6-config /usr/bin/python2.6 /usr/bin/python2.5 /usr/bin/python /etc/python2.6 /etc/python2.5 /etc/python /usr/lib/python3.0 /usr/lib/python2.6 /usr/lib/python2.5 /usr/lib/python2.4 /usr/local/lib/python2.6 /usr/local/lib/python2.5 /usr/include/python2.5_d /usr/include/python2.6 /usr/include/python2.5 /usr/include/python2.6_d /usr/share/python /usr/share/man/man1/python.1.gz
feria@influenza:~/Desktop$ which python
/usr/bin/python
feria@influenza:~/Desktop$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 2009-12-19 15:32 /usr/bin/python -> python2.6
feria@influenza:~/Desktop$ dpkg -l | grep python
ii awn-applets-python-core 0.3.2.2-2ubuntu1 A collection of applets for avant-window-nav
ii libpython2.6 2.6.4-0ubuntu3 Shared Python runtime library (version 2.6)
ii python 2.6.4-0ubuntu1 An interactive high-level object-oriented la
ii python-alsaaudio 0.2-1ubuntu2 Alsa bindings for Python
ii python-apport 1.9.3-0ubuntu4.2 apport crash report handling library
ii python-apt 0.7.13.2ubuntu4 Python interface to libapt-pkg
ii python-aptdaemon 0.10+bzr264-0ubuntu1 Python module for the server and client of a
ii python-aptdaemon-gtk 0.10+bzr264-0ubuntu1 Python GTK+ widgets to run an aptdaemon clie
ii python-avahi 0.6.25-1ubuntu5.1 Python utility package for Avahi
ii python-awn 0.3.2.1-4ubuntu1 Python bindings for avant-window-navigator l
ii python-awn-extras 0.3.2.2-2ubuntu1 Python bindings for avant-window-navigator's
ii python-awnlib 0.3.2.2-2ubuntu1 Python utilities for avant-window-navigator'
ii python-brlapi 4.0-7ubuntu2 Python bindings for BrlAPI
ii python-bugbuddy 2.28.0-0ubuntu1 Python module for bug-buddy
ii python-cairo 1.8.6-1ubuntu1 Python bindings for the Cairo vector graphic
ii python-cddb 1.4-5.1build2 Python interface to CD-IDs and FreeDB
ii python-central 0.6.11ubuntu9 register and build utility for Python packag
ii python-chardet 1.0.1-1.1 universal character encoding detector
ii python-compizconfig 0.8.2-0ubuntu1 Compiz configuration system binding...

Revision history for this message
Carlo Mandelli (camandel) wrote :

Could you send us the output of these commands?

dpkg -S /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py
dpkg -S /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py

python
>>> import sys
>>> print sys.path
>>> print __import__("sqlalchemy").__file__
<file.pyc>
ls -l <file.py>
dpkg -S <file linked>

Example:

/usr/lib/pymodules/python2.6/sqlalchemy/__init__.pyc
ls -l /usr/lib/pymodules/python2.6/sqlalchemy/__init__.py
lrwxrwxrwx 1 root root 42 2009-10-07 11:46 /usr/lib/pymodules/python2.6/sqlalchemy/__init__.py -> /usr/share/pyshared/sqlalchemy/__init__.py
dpkg -S /usr/share/pyshared/sqlalchemy/__init__.py

Revision history for this message
juanito (jferiago) wrote :

feria@influenza:~$ dpkg -S /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py
dpkg: /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py not found.
feria@influenza:~$ dpkg -S /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py
dpkg: /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py not found.
feria@influenza:~$

feria@influenza:~$ find /usr/local/lib -name schema.py
/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py
feria@influenza:~$ find /usr/local/lib -name query.py
/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py
feria@influenza:~$

feria@influenza:~$ ls -l /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py
-rwxr-xr-x 1 root staff 82254 2009-09-05 20:27 /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py
feria@influenza:~$ ls -l /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py
-rwxr-xr-x 1 root staff 83494 2009-09-05 20:27 /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py
feria@influenza:~$

With

mv /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/schema.py /tmp
mv /usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.5.2-py2.6.egg/sqlalchemy/orm/query.py /tmp

The main window apperared, but still with errors... so, a command

mv /usr/local/lib/python2.6/ /tmp

Do the trick, witthon is running! :)

I down know what installed that python 2.6 files, but witthon is a priority :)...

Carlo, Ricardo Thanks a lot, I really appreciate your help..

juanito (jferiago)
Changed in wiithon:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.