Open tuxpoldo opened 5 years ago
I remember seeing this issue mentioned at the forums some time ago.
If you think you have a solution for that, feel free to PR it ;). Then we could discuss your solution.
What is the purpose of storing a huge text blob in the database? Is it parsed at a later date? If not then truncate it at some more reasonable length, or don't store it at all.
@Milhouse IIRC that field is for storing the fanart links (thumbnail URLs) and if there are too many (or too long) links and the given value exceeds, you will end up with that error.
I've seen something similar with the Star Wars movies.
OK - I finally found where the specific table is created:
This seems to me a very generic approach. In order to fix this specific case, it would be enough to change the type of c06
to LONGTEXT
.
But this file is not database specific. Currently Kodi natively supports SQLite and MySQL/MariaDB. The implementation in VideoDatabase.cpp
uses basic SQL and makes no difference between the two databases. All string fields in the database seems to be created with type TEXT
. Unfortunately the size limit of this type is very different between SQLite (See https://www.sqlite.org/limits.html -> 10^9) and MySQL (2^16). And much more unfortunately, SQLite does not know the type LONGTEXT
. Because of this it is not possible in my opinion to fix the code without a huge modification (e.g. make the database creation and update maintenance specific to the native database implementation).
I think, that it would be better to let the person responsible of the architecture of the database part to decide how to handle differences in the database engines.
As a workaround I would suggest to provide an SQL-Script that modifies the database (with some ALTER TABLE
statements) in order to fix this kind of problems.
Probably the better solution is not to store such huge amount of data in one single field...
Similar report on the forum... https://forum.kodi.tv/showthread.php?tid=340933
You can rewrite the SQL in the DB backend. This is already done for other small differences between MySQL and SQLite.
Changing the mySql field tvshow.c06
to LONGTEXT
as recommended by @tuxpoldo fixed the scrapper problems for me. It would be nice, if the field uses LONGTEXT
for all Kodi installations by default.
Changing the mySql field
tvshow.c06
toLONGTEXT
as recommended by @tuxpoldo fixed the scrapper problems for me. It would be nice if the field usesLONGTEXT
for all Kodi installations by default.
Sorry to jump all over your post...but having recently had a single film fall foul of this issue, and karellen from the Kodi forums kindly point me in the right direction, I am wondering if there is an idiot's guide to changing the filed you've mentioned
I'm using KODI 17.6 and MySQL 5.5 if that makes any difference to you...
Happy to read up and have a tinker if required to get things sorted....I never thought having a single film out of 5000+ not scraping would be such an issue for me
TIA
+1
I just hit this issue. Again it was the thumbnails column "c06" was blown out on the "tvshow" table in MariaDB. I worked around it by changing my information provider for my TV shows (basically changed the data stored in the table to avoid to too long issue). I didn't muck around with the MariaDB structure as I feel this should be managed programatically by Kodi and I don't want the mess things up for it.
Using MEDIUMTEXT would probably be sufficient for MariaDB given that stores 16MB of text. LONGTEXT is designed for 4GB of text which may be overkill.
Using MEDIUMTEXT would probably be sufficient for MariaDB given that stores 16MB of text. LONGTEXT is designed for 4GB of text which may be overkill.
Kodi shouldn't even need to store all the URL links for posters, fanart, thumbs, etcetera. It only needs to store the graphics that have been selected, or those which are default. Should the Kodi user wish to change that current selection, then the whole list of fanart links can be retrieved from the provider. But storing the whole bucket-load of links to external fanart into the Kodi database seems pretty pointless to me.
@Klojum agreed. At most cache that list for a bit somewhere else.
Reported to MariaDB Developers by forum member sniferx1
Links and reply can be found here... https://forum.kodi.tv/showthread.php?tid=129821&pid=2875797#pid2875797
Instructions for users to fix the issue locally as provided by a member https://forums.thetvdb.com/viewtopic.php?p=165908#p165908
1) Download and install Dbeaver - https://dbeaver.io/download/
2) Within DBeaver, set up a "New Database Connection" (in my case it was a MariaDB connection, I filled in my Server Host which is my Unraid server @192.168.0.2, provide root access credentials if required, test and save the connection.
3) Once connected then to your SQL Database, click on SQL Editor/New SQL Editor
4) In the pane that opens on the right hand side, paste in the following commands separately :
ALTER TABLE MyVideos116.tvshow MODIFY COLUMN c06 mediumtext DEFAULT NULL NULL;
ALTER TABLE MyVideos116.movie MODIFY COLUMN c08 mediumtext DEFAULT NULL NULL;
5) Execute the pasted statement by using control + enter (or click the little orange arrow beside your pasted command). That's the database change made
6) Within Kodi, I had to fully refresh the affected source (TV in my case). I did this by viewing the available sources, hitting "change content" on my TV source. I then set it to use TV Maze instead of TVDB. I then clicked ok, and chose "no" when Kodi asked if I'd like to do a library refresh. I then repeated these steps, but changed the source back to using TVDB instead of TV Maze...and then clicked "yes" when Kodi asked about a library refresh - voila, that should be it, everything should scrape now.
For the record, any MySQL/MariaDB client tool that can make a connection to Kodi's video database, will do. Such as MySQL Workbench, PHPMyAdmin, HeidiSQL, Dbeaver, dbForge, et cetera. It's the database server that has to do the 'hard work'. Kodi's local SQLite database files require a specific SQLite database client tool.
I'm sure the field length workaround for field c06 can be fixed for MyVideos117+. A more elegant solution would be the rewrite of the whole "let's grab every fan art URL" routine, but I understand the implication of that.
Wow I've been trying to figure this one out for hours... Thanks for that sql statement!
Maybe a wild suggestion, but wouldn't it generally be better from a reliability perspective to split the update statement into multiples? Than the failing update of the c06
column wouldn't be such a huge problem and only lead to missing thumbnails instead of an entirely missing show.
Instructions for users to fix the issue locally as provided by a member https://forums.thetvdb.com/viewtopic.php?p=165908#p165908
- Download and install Dbeaver - https://dbeaver.io/download/
- Within DBeaver, set up a "New Database Connection" (in my case it was a MariaDB connection, I filled in my Server Host which is my Unraid server @192.168.0.2, provide root access credentials if required, test and save the connection.
- Once connected then to your SQL Database, click on SQL Editor/New SQL Editor
- In the pane that opens on the right hand side, paste in the following command:
ALTER TABLE MyVideos116.tvshow MODIFY COLUMN c06 mediumtext DEFAULT NULL NULL;
- Execute the pasted statement by using control + enter (or click the little orange arrow beside your pasted command). That's the database change made
- Within Kodi, I had to fully refresh the affected source (TV in my case). I did this by viewing the available sources, hitting "change content" on my TV source. I then set it to use TV Maze instead of TVDB. I then clicked ok, and chose "no" when Kodi asked if I'd like to do a library refresh. I then repeated these steps, but changed the source back to using TVDB instead of TV Maze...and then clicked "yes" when Kodi asked about a library refresh - voila, that should be it, everything should scrape now.
Will this or can this alteration become an issue when updating Kodi in the future?
Hi,
found this too after some weeks in trouble and 1 hour of log surfing.
I can confirm that changing the field type of MyVideos116.tvshow
to MEDIUMTEXT
solved this for me.
Thanks a lot for your work and this great piece of software.
PS: This occured for me scraping "The Simpsons" from TMDB, using Kodi 18.8 (OS X and OSMC) with MariaDB 10.4.13 on Gentoo Linux.
What is the purpose of storing a huge text blob in the database? Is it parsed at a later date? If not then truncate it at some more reasonable length, or don't store it at all.
Kodi shouldn't even need to store all the URL links for posters, fanart, thumbs, etcetera. ... But storing the whole bucket-load of links to external fanart into the Kodi database seems pretty pointless to me.
Probably the better solution is not to store such huge amount of data in one single field.
I concer with all the above. The correct fix is to control the size of data that gets written to the db, not to bloat the fields to store meaningless data.
Limits should be applied in core, but since the text is xml simple truncation won't suffice and perhaps easier to simply reject data that is too big. The other obvious place to handle this issue is in the scrapers that creates the list of URLs.
Hello,
Thanks a lot, it worked for me !
I use Kodi 18.8 on Windows 7 and MariaDB database on Synology NAS and i had this issue.
I used HeidiSQL to execute the code and it worked :+1: Bye
Ran in to this with The Simpson's as well, it was driving me crazy why I couldn't update the show properly anymore
Both the above are the new generation of Python scrapers. Both are available from the Official Kodi repository.
These two scrapers limit the number of artwork URL's that are scraped so users do not experience this issue.
...
Both the above are the new generation of Python scrapers. Both are available from the Official Kodi repository.
These two scrapers limit the number of artwork URL's that are scraped so users do not experience this issue.
Are these poised to be official replacements for would-be-legacy scrapers? Are there any other sources of official information about them?
Are these poised to be official replacements for would-be-legacy scrapers? Are there any other sources of official information about them?
Yes. https://kodi.wiki/view/Add-on:The_Movie_Database_Python https://forum.kodi.tv/showthread.php?tid=357232
I'm running into this issue with a movie set
What would be the best way to correct it?
2020-12-19 20:44:08.227 T:8116 ERROR: SQL: [MyVideos116] Undefined MySQL error: Code (1406)
Query: UPDATE movie SET c00='Ghostbusters',c01='After losing their academic posts at a prestigious university, a team of parapsychologists goes into business as proton-pack-toting \"ghostbusters\" who exterminate ghouls, hobgoblins and supernatural pests of all stripes. An ad campaign pays off when a knockout cellist hires the squad to purge her swanky digs of demons that appear to be living in her refrigerator.',c02='',c03='They ain\'t afraid of no ghost.',c05='32427',c06='Dan Aykroyd / Harold Ramis',c08='<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/sctvCtE1M1rDF4f0W2fMrk2BrGB.jpg\">https://image.tmdb.org/t/p/original/sctvCtE1M1rDF4f0W2fMrk2BrGB.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/tuGteDYTlGwQ9iyJuJyB21xlsbj.jpg\">https://image.tmdb.org/t/p/original/tuGteDYTlGwQ9iyJuJyB21xlsbj.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/771zCl6o1B8OujmfyQ3cqOV1vZr.jpg\">https://image.tmdb.org/t/p/original/771zCl6o1B8OujmfyQ3cqOV1vZr.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/pWdv8JIb5uaTx5xCQsu8oWcQxTy.jpg\">https://image.tmdb.org/t/p/original/pWdv8JIb5uaTx5xCQsu8oWcQxTy.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/zsSnQq4lGocDkqsrdVUTNNjZz7R.jpg\">https://image.tmdb.org/t/p/original/zsSnQq4lGocDkqsrdVUTNNjZz7R.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/6LPVYrROeb3fOffdV4c4xx1519z.jpg\">https://image.tmdb.org/t/p/original/6LPVYrROeb3fOffdV4c4xx1519z.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/fCL3hkDzIssiZO19YDh0iQAKBsr.jpg\">https://image.tmdb.org/t/p/original/fCL3hkDzIssiZO19YDh0iQAKBsr.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/pXmSxT4tD5z1UnV9Pc0Kxqvv2QE.jpg\">https://image.tmdb.org/t/p/original/pXmSxT4tD5z1UnV9Pc0Kxqvv2QE.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/umPZs9uuzVO8N3fHELNvrPgm1Rf.jpg\">https://image.tmdb.org/t/p/original/umPZs9uuzVO8N3fHELNvrPgm1Rf.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/ehs1ebc6QmHj5EnGFS00xTc4U4h.jpg\">https://image.tmdb.org/t/p/original/ehs1ebc6QmHj5EnGFS00xTc4U4h.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/vy4CA3MMzyolwur7Xd9CQ0BvSMX.jpg\">https://image.tmdb.org/t/p/original/vy4CA3MMzyolwur7Xd9CQ0BvSMX.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/l2DzUPNh5LkWDZhziPPwi79Z1Bh.jpg\">https://image.tmdb.org/t/p/original/l2DzUPNh5LkWDZhziPPwi79Z1Bh.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/mkZeiBRGFvfH8j6heKaY1KWzIYe.jpg\">https://image.tmdb.org/t/p/original/mkZeiBRGFvfH8j6heKaY1KWzIYe.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/kaEvrMON45xm0secxo7BysppzXw.jpg\">https://image.tmdb.org/t/p/original/kaEvrMON45xm0secxo7BysppzXw.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/yAyomn403tAtWfhFo4aL6s9ujMy.jpg\">https://image.tmdb.org/t/p/original/yAyomn403tAtWfhFo4aL6s9ujMy.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/xjNvhx9kNnbs2T3XVkkELvb1q4x.jpg\">https://image.tmdb.org/t/p/original/xjNvhx9kNnbs2T3XVkkELvb1q4x.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/ucJiQWqlzXFF3r9Ic4VgXUpJQKa.jpg\">https://image.tmdb.org/t/p/original/ucJiQWqlzXFF3r9Ic4VgXUpJQKa.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/1S7I1Ju3mxkgdsUt4G7HnwZD33b.jpg\">https://image.tmdb.org/t/p/original/1S7I1Ju3mxkgdsUt4G7HnwZD33b.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/x5Xk0UY7XHqzrzFSwz5RfKgccHi.jpg\">https://image.tmdb.org/t/p/original/x5Xk0UY7XHqzrzFSwz5RfKgccHi.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/1prYHPnpc40ouShVbEnClHEPICT.jpg\">https://image.tmdb.org/t/p/original/1prYHPnpc40ouShVbEnClHEPICT.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/vjlMrpdcNrcTQ2rgh2ENaBEqFNB.jpg\">https://image.tmdb.org/t/p/original/vjlMrpdcNrcTQ2rgh2ENaBEqFNB.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/aQleecN0ZPpMW0lDwx2kfcbT31I.jpg\">https://image.tmdb.org/t/p/original/aQleecN0ZPpMW0lDwx2kfcbT31I.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/8zAxTy0n7aevRspPc2Cy8YvSSQg.jpg\">https://image.tmdb.org/t/p/original/8zAxTy0n7aevRspPc2Cy8YvSSQg.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/jXol3DvoYMZHmViOv6bSvpUJQet.jpg\">https://image.tmdb.org/t/p/original/jXol3DvoYMZHmViOv6bSvpUJQet.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/sMagYg2XJSG5y494xOMUXUIbSNP.jpg\">https://image.tmdb.org/t/p/original/sMagYg2XJSG5y494xOMUXUIbSNP.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/ha91Ranll1qtBhLoNoCGnx9MC20.jpg\">https://image.tmdb.org/t/p/original/ha91Ranll1qtBhLoNoCGnx9MC20.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/2K2EPLT7ClhtHPtlqHi4CUAXzj9.jpg\">https://image.tmdb.org/t/p/original/2K2EPLT7ClhtHPtlqHi4CUAXzj9.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/5YNOA5sC48YdZOncB7Acn2s4ZlQ.jpg\">https://image.tmdb.org/t/p/original/5YNOA5sC48YdZOncB7Acn2s4ZlQ.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/94zmeSP9pvuPsAZfICEkGCiJsYT.jpg\">https://image.tmdb.org/t/p/original/94zmeSP9pvuPsAZfICEkGCiJsYT.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/tLrBYsu19UU5EldLzxmbee7j8er.jpg\">https://image.tmdb.org/t/p/original/tLrBYsu19UU5EldLzxmbee7j8er.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/2OVAibSx6UfTZVlxSYL1I8p16ty.jpg\">https://image.tmdb.org/t/p/original/2OVAibSx6UfTZVlxSYL1I8p16ty.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/s4rzU6pGkZeFPDuDbVhMkR3xlW.jpg\">https://image.tmdb.org/t/p/original/s4rzU6pGkZeFPDuDbVhMkR3xlW.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/2KPTibhNQT5g54FI4hgEAZMdjpP.jpg\">https://image.tmdb.org/t/p/original/2KPTibhNQT5g54FI4hgEAZMdjpP.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/zzriFZ0BMtj8IJeG2UwIJXThj29.jpg\">https://image.tmdb.org/t/p/original/zzriFZ0BMtj8IJeG2UwIJXThj29.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/uIJJPHGvStIDS09hcCeCqUmDBac.jpg\">https://image.tmdb.org/t/p/original/uIJJPHGvStIDS09hcCeCqUmDBac.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/dOMNzmmsJ588s15ECtAThfwWBjf.jpg\">https://image.tmdb.org/t/p/original/dOMNzmmsJ588s15ECtAThfwWBjf.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/beFM3UhMIjRQz3rUQeArb1NXWRL.jpg\">https://image.tmdb.org/t/p/original/beFM3UhMIjRQz3rUQeArb1NXWRL.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/4XiSpRBnN4gyaTR02qSaSeDF47o.jpg\">https://image.tmdb.org/t/p/original/4XiSpRBnN4gyaTR02qSaSeDF47o.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/88Z8bRhPuSH0wmg8BWDirYzxflu.jpg\">https://image.tmdb.org/t/p/original/88Z8bRhPuSH0wmg8BWDirYzxflu.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/nv6IDAmCZpdImL69mn97B6nwUxs.jpg\">https://image.tmdb.org/t/p/original/nv6IDAmCZpdImL69mn97B6nwUxs.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/lWxXtyIbOTK10DqjooZbsOlgUWW.jpg\">https://image.tmdb.org/t/p/original/lWxXtyIbOTK10DqjooZbsOlgUWW.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/by7SBZafV1Y3wfOhr1pGTIXOxd3.jpg\">https://image.tmdb.org/t/p/original/by7SBZafV1Y3wfOhr1pGTIXOxd3.jpg<thumb aspect=\"set.poster\" preview=\"https://image.tmdb.org/t/p/w500/g
2020-12-19 20:44:08.227 T:8116 ERROR: CVideoDatabase::SetDetailsForMovie (nfs://
@1uknowleast
Your post has nothing to do with this bug report.
Please ask your question on the forum.
Do not post your log in the forum Do not provide a snippet which is useless. PROVIDE THE FULL LOG posted at https://paste.kodi.tv/
@KarellenX , the report of @1uknowleast is very relevant. It is exactly the same issue, but now applies to the 'movie' table instead of the 'tvshow' table. The root cause is the same: The database field is too short and/or Kodi is not limiting the data size it puts into the database.
To fix this, you can use the same fix as the one you posted: https://github.com/xbmc/xbmc/issues/15768#issuecomment-564677726
But instead of running ALTER TABLE MyVideos116.tvshow MODIFY COLUMN c06 mediumtext DEFAULT NULL NULL;
you (also) need to run:
ALTER TABLE MyVideos116.movie MODIFY COLUMN c08 mediumtext DEFAULT NULL NULL;
@1uknowleast did not provide what version of Kodi he is using, what scraper and version he used or a debug log (which would give both). Instead posted an overly long snippet for a git post. The forum is the better place for that kind of "what can I do about it" post.
The root cause is the same: The database field is too short and/or Kodi is not limiting the data size it puts into the database.
Or that the scraper is not selecting the best but reasonably limited number of images results to return. I know that some scrapers have been updated to do that, rather than just store an unuseable number of URLs
@jbogers You are correct. it's the same (or at least a very similar) issue. But if you read the whole report in here, you might see, that we now have scrapers which limit the amount of data to catch to a reasonable amount. Fiddling around with the database will solve this issue as well and as Karellen mentioned, it has been reported to the MariaDB developers (not sure what the outcome is, tbh).
Anyway...we decided to limit the amount. So, Dave and Karellen, are also correct that this report (which might probably could have been closed already) is kind of useless because of the missing info. And if he's using an older version of the scraper or a version which doesn't limit the amount of data, then one should read this whole section in here.
It's already mentioned how to solve it at the database, it's also already mentioned to use a different scraper and any support on how to do this or that is better discussed at the forums. This section in here is for bug reports only and not to give support how to achieve workarounds (even if they are already mentioned ;) ).
No problem. I encountered the issue as well (with the same movie, which is what led me here). @DaVukovic I encountered the issue on a fairly standard installation of Kodi 18.9. The only 'custom' thing is the usage of a remote (and shared) MySQL database.
So I do not agree that this issue could already have been closed. It is still present (at least for movies).
As for the complete version information, I tested on 2 machines before I made the changes from the workaround.
Kodi machine 1 (Raspberry Pi 3): LibreELEC (official): 9.2.6 (kernel: Linux 4.19.127) Kodi 18.9 (18.9.0) Git:newclock5_18.9-Leia Scraper: 'The Movie database' 5.2.5
Kodi machine 2 (Intel x64 system): Windows 10 (kernel: Windows NT 10.0.18363) Kodi 18.9 (18.9.0) Git:20201023-0655c2c718 Scraper: 'The Movie database' 5.2.5
Apologies for the poor report. Sdaly, I no longer have any logs to post.
I was using Kodi 18.9 with the The Movie Database Scraper 5.2.5, I had this issue occur on a Windows 10, LibreELEC install, and on a Nvidia Shield. I resolved the issue by switching to the "The Movie Database Python 1.3.1" scraper.
This problem is not platform specific, but impacts MySQL and MariaDB client/server based setups when scraped with the old XML scrapers e.g. The Movie Database Scraper 5.2.5
and a rediculously large number of image URLs are returned (as can happens with TV shows with many seasons or I guess popular movies )
I resolved the issue by switching to the "The Movie Database Python 1.3.1" scraper.
Yes, the newer Python scrapers limit the number of URLs stored to avoid this issue. And those using the default SQLite databases will not have any problem.
@KarellenX , the report of @1uknowleast is very relevant. It is exactly the same issue, but now applies to the 'movie' table instead of the 'tvshow' table. The root cause is the same: The database field is too short and/or Kodi is not limiting the data size it puts into the database.
To fix this, you can use the same fix as the one you posted: #15768 (comment) But instead of running
ALTER TABLE MyVideos116.tvshow MODIFY COLUMN c06 mediumtext DEFAULT NULL NULL;
you (also) need to run:ALTER TABLE MyVideos116.movie MODIFY COLUMN c08 mediumtext DEFAULT NULL NULL;
Solved it for me, also. Thx for the tip.
I've just switched to a MariaDB set up and am running fresh installs of Kodi V19.0 on all devices with Default TMDB TV Shows scraper and am seeing this issue persisting for The Walking Dead even with the limiters in the new scrapers. Interestingly it occurs even when I use an NFO with no artwork links present. I assumed it would load this first and then skip the online scrape but it looks like it queries online first and then overwrites with the NFO values. I'm guessing unless you set to Local Art Only
@realcopacetic
Can you provide a debuglog that captures that issue. The logic that limits the artwork might need a tweak. thanks.
Is there a plan to adapt TVDB scrapper also ?
Is there a plan to adapt TVDB scrapper also ?
Unlikely from us as that's going to be maintained by TVDB team themselves in the near future.
This is still an issue, kodi: Build: 19.1 (19.1.0) Git: 20210509-85e05228b4 Compiled: 2021-05-09
My Scraper is themoviedb.org Tv shows
I could not for the life of me get The Simpsons to properly index. After searching google for: "kodi" "simpsons" "themoviedb" I found this thread.
I did not use any of the tools listed above, my system is a linux system so I just did it from the command line:
sudo mysql
SHOW DATABASES;
USE MyVideos119;
ALTER TABLE MyVideos119.tvshow MODIFY COLUMN c06 mediumtext DEFAULT NULL NULL;
\q
sudo reboot
After rebooting I found the empty show listing in the Files view for the simpsons and refreshed it, it properly indexed! YAY!
Hi,
I just upgraded Kodi 18.9 to Kodi 19.1 with a new MariaDB MySQL database: the issue is still here with TMDb TV Shows 1.4.7 scraper; at least with "The Simpsons".
Before applying the fix again, I just tried to scan the TV Show with another scraper: "The Movie Database" 3.5.13, and it worked: artworks are downloaded :).
Bye
@nonobio
I just upgraded Kodi 18.9 to Kodi 19.1 with a new MariaDB MySQL database: the issue is still here with TMDb TV Shows 1.4.7 scraper; at least with "The Simpsons".
Can you provide a debuglog so @pkscout and I can check it. pkscout recently updated the scraper to fix that issue, so we need to check why it is still occurring.
I just tried to scan the TV Show with another scraper: "The Movie Database" 3.5.13, and it worked:
It is not possible that it worked with the XML scraper
Hi,
@KarellenX
To be sure, I deleted the show from my library (content: none, delete from library: yes). Then I deleted all jpeg and nfo files and .actors folders with my "The Simpsons" directory.
And I started Kodi, it found The Simpsons with TMDb TV Shows..., and: it worked! :)
Maybe it was caused by my files presents in my folder following an "separed file" library exportation, or something else...
Bye
Pretty miffed by this entire saga. I would of thought (hoped) that the Kodi team would of fixed this between v18 and v19, and it appears, even to my untrained eye, that nothing has been done, when a simple change to the code that creates the database columns to make them "MEDIUMTEXT" instead of "TEXT" would of fixed this for everyone, and been the easiest solution for all concerned, especially since the TVDB scrapers aren't being maintained so a fix via that route isn't going to be forthcoming any time soon.
I can't use "TMDB" or "TVMaze" scrapers for my library as they both have limited coverage for shows I possess. Neither do I want to have to go cherry-picking different scrapers for individual shows to get around that issue. For me: One media category, one scraper.
What causes my frustration more than anything else is that i've been fighting with this for three weekends in a row, using up a massive amounts of my free time, analysing & troubleshooting issues with my MariaDB servers, NAS devices, NFOs, TV Show structure, practically everything connected with Kodi, and getting absolutely nowhere, simply because I didn't know that this issue was still present in Kodi v19 Matrix, or didn't draw the connection - until now.
This could of been mitigated easily. Perhaps there is a reason why the databases cannot be changed, if there is, I'd like to hear it. But changing the scraper(s) that are maintained AND modifying the database code would of covered all the bases in my view. I doubt I'm in a minority with regards having Kodi crash incessantly while scraping TV shows into the library on MySQL/MariaDB servers, judging by some of the forum posts I've read today.
@gibxxi
especially since the TVDB scrapers aren't being maintained
I am not aware of this problem with TVDB scrapers. TVDB don't have hundreds of images for a show, nor does the scraper use fanart.tv which adds more artwork links.
Which show(s) is/are causing you the trouble? TVDB are currently developing their own scraper, so now would be a good time to advise them to limit the amount of artwork scraped.
I doubt I'm in a minority with regards having Kodi crash incessantly while scraping TV shows into the library on MySQL/MariaDB servers
I am not aware of this issue causing crashing. The only problem that occurs here is that the tv show refuses to be added to the library. No crashing involved.
Provide a debuglog and lets see if there is something else causing a problem.
As for your other comments, yes on the surface it does seem to be a simple fix, but maybe there are consequences to this change. I have no idea. Maybe a developer can let us know.
I did an entire library scan (3 times as I have 3x systems) on SQLite, and had no issues whatsoever. Repeat the same scan on MariaDB and had Kodi CTD 3 times in succession using the same scraper: TheTVDB (new). It might be the case that i'm way off base here, and that my issue is unrelated.
I've just manually changed my databases with the fixes listed above and am attempting to re-scrape again for the umpteenth time via TVDB (I've been hammering their server so much over the past few weeks, they must love me - not). I will post here again my results.
The idea for me is to broadly use MariaDB for all my installs, with local (SQLite) databases as a fallback option, should I need to shut down the MariaDB server(s) for an extended period. While the SQLite Dbs will go out of date fairly quickly due to lack of use, they won't be empty, so a simple update will bring them back up to speed in short order.
I'm also not using old imported databases. This round of troubleshooting is with fresh installs. If I should fail to get to the root cause of this problem, I will submit a debug log as requested. I am not actively seeking support here. I want to identify and solve / work around the issue myself, but thanks for your reply.
Oh and just to be clear - I'm not using any banned addons that could be causing this. I don't use anything of that nature and never have.
Ok.
Head over to the forum with the debuglog and start a new thread. Don't want to clutter up this PR with possibly unrelated problem.
Also, consider using nfo files so you are not hammering TVDB with all the API requests.
Already using NFOs, but it seems that the scraper is ignoring them in some cases as it's still grabbing the wrong show. But again, that's a separate issue. Signing out for now.
This is still an issue in kodi 20. Can someone update the field type to resolve this issue?
I've run into this issue as well with Kodi 20.2 on the movie table (c08 column) in combination with TMDB scraper.
Then you are using the wrong scrapers. All the newer Python scrapers have fixed this issue. If you are still having a problem, then you are using one of the older, unmaintained scrapers. TMDB TV Shows or TVDB v4 TheMovie Database Python scraper are the ones you should be using.
Bug report
Failure to scrape Series on Systems with MySQL Database
Describe the bug
This behaviour was observed on Systems working with MySQL Database: when trying to scrape some TV series with
metadata.tvshows.themoviedb.org
the data is not written correctly to the database. This happens with some series like "Game of Thrones".Expected Behavior
The metadata is scraped correctly
Actual Behavior
A broken (Empty) TV Series is created
Possible Fix
The Kodi log file shows that an error occurs when the information would be stored in the table
tvshow
:Series like "Game of Thrones" are well documented in The Movie Database and users have provided a huge amount of posters, fan art, etc. Because of this, the amount of data returned by the TMDb API is quite big. A huge part of the response will be stored in the field
tvshow.c06
- the type of this field isTEXT
.According to the MySQL Documentation, the maximum length of data in a field of type
TEXT
is 2^16 ( = 65536 Bytes). This seems to be too short for some TV Series.After changing the type of the field to
LONGTEXT
everything works fine.Maybe it is a good idea to check if other fields in other tables may have the same problem.
To Reproduce
Steps to reproduce the behavior:
metadata.tvshows.themoviedb.org
as TV Series scraperGame of Thrones
.Debuglog
The debuglog can be found here:
Your Environment
Used Operating system:
[X] Linux
[X] OSX
Operating system version/name: LibreELEC (official): 9.0.1, kernel: Linux x86 64-bit version 4 .19.23
Kodi version: Kodi (18.1 Git:18.1-Leia). Platform: Linux x86 64-bit
Operating system version/name: OS X 10.14.3, kernel: Darwin x86 64-bit version 18.2.0
Kodi version: Kodi (18.1 Git:20190217-8cfdc895f3). Platform: OS X x86 64-bit
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.