Fanart Grabber - script for skinners

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Gade Offline
Senior Member
Posts: 184
Joined: Jan 2013
Reputation: 8
Location: Copenhagen, Denmark
Post: #76
(2014-02-22 19:34)robweber Wrote:  Please do. From the looks of the log it is trying a "GetDirectory" action when really it should just be pulling that one image. The script is getting the image location directly from XBMC so there shouldn't be any confusion at that level about where the file actually lives. If it is working for one category and not another I think the skin code would be a good place to check first. I tried to take a quick look but without be familiar with that skin it was hard to find exactly what pieces are visible and when. Please post back if you find anything.

Hi again.

I updated the support for script.grab.fanart and now everything seems to work properly.

The fix is included in the next update of my Rapier mod.

laconical: please report back if this fixes our problems.

The update will be in this thread soon.
find quote
elusien Offline
Senior Member
Posts: 177
Joined: Jan 2013
Reputation: 1
Location: Polis Chrysochous, Cyprus
Post: #77
@robweber

I've been trying to help a guy who seems to have a problem with 'script.grab.fanart' taking a long time to finish when he shuts down XBMC.

Could you please have a look at the post below and the accompanying debug log to see if this is indeed the case and if so, why?

http://forum.xbmc.org/showthread.php?tid=189639

Thanks.

DEBUG log: http://wiki.xbmc.org/index.php?title=Log_file/Easy
HTPC advice: http://mymediaexperience.com , http://lifehacker.com/5828747/how-to-bui...lete-guide
My HTPC: an Acer Revo RL80 Nettop PC:
Windows 8
Intel Core-i3-2377M @ 1.5GHz, 4GB DDR3 @ 665MHz, Intel HD3000
465GB SATA disk, DVD-RW


find quote
Martijn Offline
Team-XBMC
Posts: 11,062
Joined: Jul 2011
Reputation: 158
Location: Dawn of time
Post: #78
Please remove the log spamming from the script. it's making debugging XBMC near useless when this script is forced installed

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
robweber Offline
Posting Freak
Posts: 867
Joined: Sep 2009
Reputation: 26
Post: #79
Done. I've experienced this being a problem as well. Pull request being sent now.
find quote
darknior Offline
Member
Posts: 76
Joined: Aug 2008
Reputation: 0
Post: #80
I don't want to spam you, but finaly found this thread and think it can help you to know i have a bug with your Fanart Grabber :'
It make me an UTF8 error, i think when it try to read an NFO in UTF8 ??

Code:
17:45:01 T:1588  NOTICE: script.grab.fanart: Grab Fanart Service Started
17:45:03 T:1588   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'utf8' codec can't decode byte 0x82 in position 30: invalid start byte
                                            Traceback (most recent call last):
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 351, in <module>
                                                GrabFanartService().run()
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 37, in __init__
                                                self.grabRandom()
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 158, in grabRandom
                                                media_array = self.getJSON('VideoLibrary.GetMovies','{"properties":["title","art","year","file","plot"]}')
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 319, in getJSON
                                                jsonobject = json.loads(json_response)
                                              File "C:\Program Files (x86)\XBMC\system\python\Lib\json\__init__.py", line 338, in loads
                                                return _default_decoder.decode(s)
                                              File "C:\Program Files (x86)\XBMC\system\python\Lib\json\decoder.py", line 365, in decode
                                                obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                                              File "C:\Program Files (x86)\XBMC\system\python\Lib\json\decoder.py", line 381, in raw_decode
                                                obj, end = self.scan_once(s, idx)
                                            UnicodeDecodeError: 'utf8' codec can't decode byte 0x82 in position 30: invalid start byte
                                            -->End of Python script error report<--

Maybe you can update it for a future update ?
Thanks
find quote
robweber Offline
Posting Freak
Posts: 867
Joined: Sep 2009
Reputation: 26
Post: #81
That is very interesting. The actual root of the error is in the json python library - something about the returned JSON response threw a decode error. I'm going to pass this along to one of the XBMC devs on the Trac website. I think the JSON-RPC server should probably strip that stuff out before returning it rather than the library having to worry about it. It must have been something in the Title or Plot of the film that it didn't like. Do you have any non-English titles in your movie library?

I could certainly write a try/catch for this, but the result would be no movies being grabbed as this is happening at the JSON decode level. Would stop the error but kind of be useless for you.
find quote
robweber Offline
Posting Freak
Posts: 867
Joined: Sep 2009
Reputation: 26
Post: #82
(2014-05-07 23:41)darknior Wrote:  I don't want to spam you, but finaly found this thread and think it can help you to know i have a bug with your Fanart Grabber :'
It make me an UTF8 error, i think when it try to read an NFO in UTF8 ??

Code:
17:45:01 T:1588  NOTICE: script.grab.fanart: Grab Fanart Service Started
17:45:03 T:1588   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'utf8' codec can't decode byte 0x82 in position 30: invalid start byte
                                            Traceback (most recent call last):
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 351, in <module>
                                                GrabFanartService().run()
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 37, in __init__
                                                self.grabRandom()
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 158, in grabRandom
                                                media_array = self.getJSON('VideoLibrary.GetMovies','{"properties":["title","art","year","file","plot"]}')
                                              File "C:\Users\Darknior\AppData\Roaming\XBMC\addons\script.grab.fanart\service.py", line 319, in getJSON
                                                jsonobject = json.loads(json_response)
                                              File "C:\Program Files (x86)\XBMC\system\python\Lib\json\__init__.py", line 338, in loads
                                                return _default_decoder.decode(s)
                                              File "C:\Program Files (x86)\XBMC\system\python\Lib\json\decoder.py", line 365, in decode
                                                obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                                              File "C:\Program Files (x86)\XBMC\system\python\Lib\json\decoder.py", line 381, in raw_decode
                                                obj, end = self.scan_once(s, idx)
                                            UnicodeDecodeError: 'utf8' codec can't decode byte 0x82 in position 30: invalid start byte
                                            -->End of Python script error report<--

Maybe you can update it for a future update ?
Thanks

The more I looked at this the more I thought I'd try something. I've added a decode() function to try and replace the non standard characters that the json parser doesn't seem to like. I've pushed it to a new branch on github. If you could try out - https://github.com/robweber/script.grab....decode.zip this file and see if it helps that would be great. Hard for me to reproduce this myself.
find quote
JPM39 Offline
Junior Member
Posts: 1
Joined: Oct 2013
Reputation: 0
Post: #83
Hi,

A short feedback:
I got the same error message for some weeks (most of the titles in my movie library are in French) but didn't take care of it until yesterday. I quickly found this post and updated with v 0.13.1: the error message has disapeared.

Thanks a lot for your job.
find quote
kidhazy Offline
Junior Member
Posts: 14
Joined: Nov 2009
Reputation: 0
Location: Melbourne, Australia
Post: #84
Using script.grab.fanart 0.13.2 as part of Aeon Nox 5 (5.1.3) I come across some blank movie fanarts for random fanart as backgrounds. (XBMC 13.1 on Windows 7 x64)

I'm note sure if the problem is with the fanart jpeg, the skin or the script.

Code:
7:28:01 T:9132 WARNING: XFILE::CDirectoryFactory::Create - Unsupported protocol(image) in image://smb%3a%2f%2f192.168.1.22%2fMyBook%2fVideos%2fMovies%2fRed%20Dog%20(2011)%2ffanar​t.jpg/
17:28:21 T:9132 WARNING: XFILE::CDirectoryFactory::Create - Unsupported protocol(image) in image://smb%3a%2f%2f192.168.1.22%2fRdrive%2fVideos%2fMovies%2fThe%20Lord%20of%20the%20Ri​ngs%20-%20The%20Fellowship%20of%20the%20Ring%20(2001)%2ffanart.jpg/[/size]

If I specify any background as "Random Fanart" all the music, TV Show fanarts work - it's only certain Movie fanarts that have the 'unsupported protocol' message.

I can view the files that fail outside of XBMC. They're 1920 x 1080 x 24bit files - but other files with these characteristics are fine.

I can't seem to work out what may be causing the protocol issue.

Do these protocol errors point towards the script, or is it the skin that may throwing the error?
Or is there something I can check about the characteristics of the pictures?

Thanks.
(This post was last modified: Today 10:24 by kidhazy.)
find quote
Post Reply