Fix some problems with Docker container#243
Open
oliver wants to merge 2 commits intomediathekview:masterfrom
Open
Fix some problems with Docker container#243oliver wants to merge 2 commits intomediathekview:masterfrom
oliver wants to merge 2 commits intomediathekview:masterfrom
Conversation
This fixes the /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/scripts/cont-init: line 20: /etc/cont-init.d/95_mediathekview_db: Permission denied error message when starting the container.
Starting with version 9.2.0 the cursor.execute() method does not support the "multi" parameter any more, leading to error message TypeError: MySQLCursor.execute() got an unexpected keyword argument 'multi' By pinning the mysql-connector-python version to 9.1.0 the updater works, for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes two problems I encountered when setting up the Docker container for MySQL database:
/package/admin/s6-overlay-3.2.0.2/etc/s6-rc/scripts/cont-init: line 20: /etc/cont-init.d/95_mediathekview_db: Permission denied.To fix this, the
docker/95_mediathekview_dbis now marked as executable in Git.TypeError: MySQLCursor.execute() got an unexpected keyword argument 'multi'. It looks like beginning with mysql-connector-python 9.2.0 thecursor.execute()method does not support themultiparameter any more (see docs and changelog).I did not quite understand how to migrate to the suggested replacement feature (Executing Multiple Statements) – maybe
fetchall()needs to be used now? To fix this for now I have explicitly installed mysql-connector-python version 9.1.0.Also, I noticed that when running the container with an empty data directory and with
RUN_ON_STARTUP=yes, mvupdate3 would be started while MySQL was still starting up; and then mvupdate3 would fail with error messagemysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (Errno 111: Connection refused). Restarting the container fixed this (because then the database already existed).Thank you for providing this plugin!