MySQL support on Windows fails

Bug #714510 reported by Jonathan Corwin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Low
Raoul Snyman

Bug Description

Now this may be user error on my part, so apologies in advance if so.
I attempted to turn on MySQL support for Windows (7 Enterprise), running the latest Windows package exe.

I pasted the following into an openlp.reg text file and used it to update the registry:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\OpenLP\OpenLP\songs]
"db username"="user"
"db password"="password"
"db hostname"="host"
"db database"="test"
"db type"="mysql"

Now when I start OpenLP, the following appears in the debug trace:

2011-02-07 10:52:59,707 openlp.core.lib.pluginmanager DEBUG Loaded plugin <class 'PresentationPlugin'> with helpers
2011-02-07 10:52:59,707 openlp.core.lib.pluginmanager DEBUG Loaded plugin <class 'RemotesPlugin'> with helpers
2011-02-07 10:52:59,763 root ERROR Traceback (most recent call last):
  File "<string>", line 287, in <module>
  File "<string>", line 281, in main
  File "<string>", line 191, in run
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.core.ui.mainwindow", line 583, in __init__
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.core.lib.pluginmanager", line 105, in find_plugins
  File "c:\dev\OpenLP\plugins\songs\songsplugin.py", line 56, in __init__
    self.manager = Manager(u'songs', init_schema)
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.core.lib.db", line 134, in __init__
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.plugins.songs.lib.db", line 161, in init_schema
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.core.lib.db", line 54, in init_db
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine", line 254, in create_engine
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.strategies", line 60, in create
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\windows-updates\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.dialects.mysql.mysqldb", line 101, in dbapi
  File "c:\Documents and Settings\raoul\My Documents\My Projects\pyinstaller\iu.py", line 436, in importHook
  File "c:\Documents and Settings\raoul\My Documents\My Projects\pyinstaller\iu.py", line 521, in doimport
  File "c:\dev\OpenLP\eggs\mysql_python-1.2.3-py2.6-win32.egg\MySQLdb\__init__.py", line 19, in <module>
    import _mysql
  File "c:\Documents and Settings\raoul\My Documents\My Projects\pyinstaller\iu.py", line 436, in importHook
  File "c:\Documents and Settings\raoul\My Documents\My Projects\pyinstaller\iu.py", line 521, in doimport
  File "c:\dev\OpenLP\eggs\mysql_python-1.2.3-py2.6-win32.egg\_mysql.py", line 7, in <module>
    __bootstrap__()
  File "c:\dev\OpenLP\eggs\mysql_python-1.2.3-py2.6-win32.egg\_mysql.py", line 4, in __bootstrap__
    __file__ = pkg_resources.resource_filename(__name__,'_mysql.pyd')
  File "c:\dev\OpenLP\eggs\setuptools-0.6c11-py2.6.egg\pkg_resources.py", line 882, in resource_filename
    self, resource_name
  File "c:\dev\OpenLP\eggs\setuptools-0.6c11-py2.6.egg\pkg_resources.py", line 1352, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "c:\dev\OpenLP\eggs\setuptools-0.6c11-py2.6.egg\pkg_resources.py", line 1363, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: '_mysql\\_mysql.pyd'
None

Related branches

description: updated
description: updated
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Please try again with the latest Windows build, as of 22:45 SAST.

Changed in openlp:
assignee: nobody → Raoul Snyman (raoul-snyman)
milestone: none → 1.9.5
Revision history for this message
Jonathan Corwin (j-corwin) wrote :
Download full text (4.0 KiB)

Latest windows exe 1301 now gets further. Program starts and database tables are created.

However when I tried to save a new song with new author:

Traceback (most recent call last):
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.plugins.songs.forms.editsongform", line 659, in accept
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.plugins.songs.forms.editsongform", line 712, in saveSong
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/openlp.core.lib.db", line 149, in save_object
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.scoping", line 139, in do
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.session", line 623, in commit
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.session", line 385, in commit
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.session", line 369, in _prepare_impl
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.session", line 1397, in flush
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.session", line 1478, in _flush
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.unitofwork", line 304, in execute
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.unitofwork", line 448, in execute
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.orm.mapper", line 1872, in _save_obj
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.base", line 1191, in execute
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.base", line 1271, in _execute_clauseelement
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.base", line 1302, in __execute_context
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.base", line 1401, in _cursor_execute
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.base", line 1394, in _cursor_execute
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/sqlalchemy.engine.default", line 299, in do_execute
  File "C:\Documents and Settings\raoul\My Documents\My Projec...

Read more...

Revision history for this message
Jonathan Corwin (j-corwin) wrote :

Note, the mysql server is configured to create InnoDB tables by default.

Changed in openlp:
status: New → In Progress
importance: Undecided → Low
Changed in openlp:
milestone: 1.9.5 → 1.9.6
Revision history for this message
Jonathan Corwin (j-corwin) wrote :

As long as the MySQL is set to create MyISAM tables by default, then it should now be possible to use MySQL to store songs, using the settings in the description.

mysql> set global storage_engine=myisam;

Changed in openlp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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