ITADN

Fix some problems with Docker container

#243Pull Requestoliver 创建于 2025-03-22
O
olivercommented
This PR fixes two problems I encountered when setting up the Docker container for MySQL database: - at container startup there was an error message: `/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_db` is now marked as executable in Git. - when the mvupdate3 tool was running there was a Python error: `TypeError: MySQLCursor.execute() got an unexpected keyword argument 'multi'`. It looks like beginning with mysql-connector-python 9.2.0 the `cursor.execute()` method does not support the `multi` parameter any more (see [docs](https://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html) and [changelog](https://dev.mysql.com/doc/relnotes/connector-python/en/news-9-2-0.html)). I did not quite understand how to migrate to the suggested replacement feature ([Executing Multiple Statements](https://dev.mysql.com/doc/connector-python/en/connector-python-multi.html)) – 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 message `mysql.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!
合并状态:未合并 0 条评论