Closed A---- closed 7 years ago
Looks like it comes from here: https://github.com/wackerl91/luna/blob/develop/resources/lib/scraper/scraperchain.py#L20
It seems that the game is neither Steam
or Steam Bootstrap Client
, and that the scraper_chain
is not populated (or none of them are enabled).
I'll spread some log-call sprinkles around, see what's what.
Yep, that's the location. Either way, there should be some check in place to catch an empty list (although that should never haben).
The scraper-chain should never be empty. (Reference: https://github.com/wackerl91/luna/blob/develop/resources/lib/config/features.yml#L137) As you can see, there's one more scraper than in the settings (NvHTTP), which should always be enabled. I'd probably log the properties of the passed NvApp, the API responses in the scraper chain (and possibly the scraper's name) to get a feel for what's going on.
@A---- Does this also fail for you if you enable at least on of the scrapers in the settings (e.g. OMDb, it's the fastest)? I won't have time to properly look at this for the next couple days, so if you have some time to provide some additional information it's greatly appreciated!
I didn't change the settings since the 0.6.3, so I think there are scrapers enabled. I did not have the time to have a look at it these last few days but sure.
Well, I don't want to cause you any inconvenience by checking this - if you currently don't have too much time as well, that's perfectly fine and I'll just debug the entire setup process (might need to have to do so anyway, because of a weird storage bug).
That being said, I believe that most of the settings should migrate properly ... hard to tell for me, because I never went from a clean 0.6.3. to the current RC, but always copied my current state to the Pi for testing.
That's also something that I'll try, to uncheck scrapers, save conf, recheck them, save, but I'll try to provide information before doing so.
Adding self.logger.info("%d scrapers in the chain!" % len(self.scraper_chain))
after if nvapp.title not in self.game_blacklist:
tells me that yes, there are no scrapers available
Adding self.logger.info("Appending %d scrapers" % len(scrapers))
to def append(self, scrapers):
tells me it's never called.
So I tried to place assert False, 'Message'
(I only have written a few thousands lines of Python, and it was a long time ago) at different places in RequestFeature
. No dice, doesn't even crash or anything.
I also tried to disable "experimental scraper feature" on/off, no luck either.
What I find weird is that there's no nvhttpscraper.pyo
in that folder.
$ ls ~/.kodi/addons/luna-0.7.0-rc1/resources/lib/scraper/
__init__.py abcscraper.py igdbscraper.py omdbscraper.py scraperchain.pyo
__init__.pyo abcscraper.pyo nvhttpscraper.py scraperchain.py tgdbscraper.py
That smells bad…
You're right, that's fishy. I'm on my phone right now, so sorry for the short answer. Given that the .pyo files are missing and append is never called, I suspect that this block is throwing a key error (which is expected to happen, thus I'm not reacting). I'll have to have a look at this tomorrow ... that part of Luna is supposed to work no matter what.
Thanks for your the time you put in to post some findings! Really appreciate this!
I had a folder named addons/script.luna
(previous version?) and that one did not have a nvhttpscraper
registered in its features.yml
. So I did a clean install and removed any folder that had luna in it
I have the same .storage
creation issue as someone else, fixed it and… same error.
So back to where I was. To the block you mentioned. I have an abcscraper.pyo
, probably loaded by NvHTTPScraper
(base class) but do not have a apiresponse.pyo
(compiled on the fly and not called at the moment?).
I have a requestservice.pyo
which probably means it was successfully instanciated and passed to the __init__
(DI). I commented out this line https://github.com/wackerl91/luna/blob/develop/resources/lib/scraper/nvhttpscraper.py#L10, same thing. I do not have a art/poster
directory in my storage folder.
$ ls userdata/addon_data/script.luna/.storage/
game_storage host update
I'm out of idea for tonight.
I had a folder named addons/script.luna (previous version?) and that one did not have a nvhttpscraper registered in its features.yml. So I did a clean install and removed any folder that had luna in it
Which zip did you download from the release page? The ones I attach manually (in this case called script.luna-0.7.0-rc1.zip
) should install to script.luna
.
~The NvHTTPScraper did not exist back in 0.6.3~ (Edit tells me: It did exist in that version and it was also wired using the DI - stupid me! Might be that the folder you had lying around was even older than that, all the Nv* stuff is pretty young compared to the first iteration of the DI). As you've probably seen, even the format of the features.yml
file is somewhat different. This is due to major advancements in parsing this file and creating services from it (in an attempt to make things faster and more accessible). The goal was that everyone can build new services and wire them together, without having to care for who it actually works (which are the ugly parts you've visited ;) ) ... well, pretty much what you would use a DI for, even though the use is debatable in Python.
I have the same .storage creation issue as someone else, fixed it and… same error.
That should also be fixed now :)
So back to where I was. To the block you mentioned. I have an abcscraper.pyo, probably loaded by NvHTTPScraper (base class) but do not have a apiresponse.pyo (compiled on the fly and not called at the moment?).
I can't explain why the parent class is compiled, when the child class is not even instantiated. For some reason the module got imported already, which is why there's a .pyo and also the reason why there's no apiresponse.pyo
, because it's module is never imported, which again isn't the case because non of the scraper modules have been imported. If you care, have a look at the changes made and it should be obvious why that is the case.
I have a requestservice.pyo which probably means it was successfully instanciated and passed to the init (DI).
The RequestService is used by more classes than just the NvHTTPScraper.
I commented out this line https://github.com/wackerl91/luna/blob/develop/resources/lib/scraper/nvhttpscraper.py#L10, same thing. I do not have a art/poster directory in my storage folder.
That's the case because it's - as I said above - never instantiated.
The digging you did was really helpful in reducing the time to find the actual issue (actually only took me a couple of minutes now, because I didn't have to debug the entire ScraperChain). So again, thank you so much for all of the time you invested into figuring out whats wrong!
If you're interested in how the parts of Luna you've visited today are working and / or need some additional explanation, why the changes made in #112 fix the underlying issue, just shoot me a mail (see me profile page) and I'll either send you a high level description or we can have a short Skype call.
So obvious now.
I installed the RC2 and its scraping the game list at the moment.
Thanks a lot!
I'm glad that this is working for you now!
Don't hesitate to let me know what you think of the new UI and if you run into any further bugs!
Devices got paired, but when clicking on the PC's name, a dialog flashes (do not have time to read it) and does nothing. I guess I should be seeing the game list next.
I have the following out of bound error in my kodi.log:
I tried to clear the game cache, uninstall/install. 0.6.3 worked alright.
Shoot if you need more information.
I have an HiFiBerry DAC+ Pro and I found and selected it alright in the audio device selection page.