← Back to team overview

openlp-core team mailing list archive

[Bug 714510] Re: MySQL support on Windows fails

 

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 Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/MySQLdb.cursors", line 174, in execute
  File "C:\Documents and Settings\raoul\My Documents\My Projects\openlp\trunk\build\pyi.win32\OpenLP\outPYZ1.pyz/MySQLdb.connections", line 36, in defaulterrorhandler
IntegrityError: (IntegrityError) (1452, 'Cannot add or update a child row: a foreign key constraint fails ("test"."songs", CONSTRAINT "songs_ibfk_1" FOREIGN KEY ("song_book_id") REFERENCES "song_books" ("id"))') 'INSERT INTO songs (song_book_id, title, alternate_title, lyrics, verse_order, copyright, comments, ccli_number, song_number, theme_name, search_title, search_lyrics) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (0, 'title', 'alternate', '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<song version="1.0"><lyrics><verse type="Verse" label="1"><![CDATA[lyrics]]></verse></lyrics></song>', '', '', '', '', '', None, 'title@alternate', 'lyrics ')

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/714510

Title:
  MySQL support on Windows fails

Status in OpenLP - Worship Presentation Software:
  New

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



References