Branch/Commit: master / 882758f0a88be7a48228e25e95c506fad926335a (v2020.06.03-4)
OS: Linux / Docker
Browser: Any
What you did:
I saw similar issues were reported and maybe fixed 2 days ago since those issues were closed so I updated my SC instance to hopefully resolve these errors. I did confirm I'm not out of space and that SC has permission to write. Seems to only happen when SC is doing the daily Force Update / Refresh. Haven't noticed the errors when processing / adding new episodes.
What happened:
Update applied fine but I'm still getting these errors.
What you expected:
These errors to go away / not happen :) This seems to have started after I updated my SC instance on 5/31. I try to update my SC within a day or 2 of seeing there is an update.
Logs:
2020-06-04 11:57:28 ERROR SHOWQUEUE-FORCE-UPDATE :: [882758f] Unable to write file to /tv/Show Name/Season 03/ShowNAme - s03e23 - Episode Name - SDTV.nfo - are you sure the folder is writable? junk after document element: line 9, column 0
Traceback (most recent call last):
File "/app/sickchill/sickbeard/metadata/generic.py", line 318, in update_episode_metadata
episodeXML = etree.ElementTree(file=xmlFileObj)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 611, in __init__
self.parse(file)
File "<string>", line 38, in parse
ParseError: junk after document element: line 9, column 0
The line number (9 in the above example) seems to change. I've seen 9, 10 and 109 so far since doing the update.
Issue-Label Bot is automatically applying the label Bug / Issue to this issue, with a confidence of 0.89. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Because your nfo file is not proper xml. Fix your nfo files.
Paste the contents of the file this error occurred in (not any random one, I need the one that has the error on line 8/9. Do not edit it, just paste it.
I did some log parsing to identify all the episodes that are generating this parse error and they all have one thing in common. All of them are single video files that contain multiple episodes in them (e.g. s01e01e02e03). Looking at the nfo file, the reported error line number corresponds with with the start of a new
Broken File Example:
<?xml version="1.0" encoding="utf-8"?>
<episodedetails>
<title>Episode 1</title>
<season>1</season>
<episode>1</episode>
</episodedetails>
<episodedetails> <<< ---- Line for the error ---- >>>
<title>Episode 2</title>
<season>1</season>
<episode>2</episode>
</episodedetails>
<episodedetails>
<title>Episode 3</title>
<season>1</season>
<episode>3</episode>
</episodedetails>
I renamed one of the bad nfo files and then clicked "re-scan files" to have SC re-gen a new nfo file and the new nfo file now wraps all the
New File Example:
<?xml version="1.0" encoding="utf-8"?>
<kodimultiepisode>
<episodedetails>
<title>Episode 1</title>
<season>1</season>
<episode>1</episode>
</episodedetails>
<episodedetails>
<title>Episode 2</title>
<season>1</season>
<episode>2</episode>
</episodedetails>
<episodedetails>
<title>Episode 3</title>
<season>1</season>
<episode>3</episode>
</episodedetails>
</kodimultiepisode>
So it looks like the quick easy fix is just to delete the broken nfo files and have SC gen a new one in the correct multi-episode format.
Thanks for pointing me in the right direction. Didn't even think the error was with the existing nfo file since some of these episodes haven't changed in years.
Yes sir there can only be one parent node. It did not error before because SC never updated the episode nfo files once they were created. Now, if something is modified on tvdb we update the info in the nfo also (title, airdate, etc)
Glad you found the problem, I'm not sure what program created those without the kodimultiepisode parent lol.
Most helpful comment
I did some log parsing to identify all the episodes that are generating this parse error and they all have one thing in common. All of them are single video files that contain multiple episodes in them (e.g. s01e01e02e03). Looking at the nfo file, the reported error line number corresponds with with the start of a new xml tag that represents the next episode the single file contains.
Broken File Example:
I renamed one of the bad nfo files and then clicked "re-scan files" to have SC re-gen a new nfo file and the new nfo file now wraps all the tags inside of a tag.
New File Example:
So it looks like the quick easy fix is just to delete the broken nfo files and have SC gen a new one in the correct multi-episode format.
Thanks for pointing me in the right direction. Didn't even think the error was with the existing nfo file since some of these episodes haven't changed in years.