leepeuker / movary

Self hosted web app to track and rate your watched movies

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jellyfin Export "error in your SQL syntax"

slimshizn opened this issue · comments

commented

Description

Using docker exec movary php bin/console.php jellyfin:export 1 per documentation gives the error below.

Version

0.59.0

Steps to Reproduce

Setup Movary
Setup Jellyfin Authentication
docker exec movary php bin/console.php jellyfin:export 1
Error

Screenshots

No response

Logs

docker exec movary php bin/console.php jellyfin:export 1
2023-10-08 11:27:57:717544 - Exporting movie watch dates to Jellyfin...
2023-10-08 11:27:57:718458 - ERROR: Could not complete Jellyfin export.
[2023-10-08T13:27:57.718663+02:00] movary.ERROR: Could not complete Jellyfin export {"exception":"[object] (Doctrine\\DBAL\\Exception\\SyntaxErrorException(code: 1064): An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIQUE(movie_id)\nFROM movie_user_watch_dates\nWHERE user_id = '1'\nGROUP by movie_' at line 1 at /app/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:86)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 1064): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIQUE(movie_id)\nFROM movie_user_watch_dates\nWHERE user_id = '1'\nGROUP by movie_' at line 1 at /app/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28)\n[previous exception] [object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNIQUE(movie_id)\nFROM movie_user_watch_dates\nWHERE user_id = '1'\nGROUP by movie_' at line 1 at /app/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:121)"} []

Server OS

Docker

Client Platform

None

Client Device

ssh

Client OS

No response

Client Browser

No response

Additional Context

No response

Fixed SQL query with #533, check out the nightly image to test or wait for the next release.

Thanks for reporting!

commented

changed over to nightly and re ran the migration. New error:

docker exec movary php bin/console.php jellyfin:export 1
2023-10-08 14:02:41:846406 - Exporting movie watch dates to Jellyfin...
PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /app/vendor/doctrine/dbal/src/Driver/PDO/Result.php on line 119

Oh interesting. How many plays do you have? I will look into this too, seems something is not optimized.

commented

More than I wish to discuss haha. Thanks for looking into it.

I have created a new issue for this #534.
I try to look into it this week.