wackerl91 / luna

Moonlight Launcher for Kodi
GNU General Public License v3.0
100 stars 22 forks source link

Can't list games (because their info can't be got) #130

Closed posti85 closed 7 years ago

posti85 commented 7 years ago

Expected Behaviour: After I susscefully pair my PC, I try to open the game list (just enter the addon).

Actual Behaviour: Error opening the addon: It seems is because luna can't get the game info, and the it fails loading the list. Here is the log:

...
21:24:31.170 T:1577055216  NOTICE: [script.luna] [CoreService] - initialized
21:24:32.332 T:1577055216   ERROR: /home/osmc/.kodi/addons/script.module.requests/lib/requests/packages/urllib3/connectionpool.py:843: InsecureRequestWarning: **Unverified HTTPS request is being made**. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
                                              InsecureRequestWarning)
21:24:32.380 T:1577055216  NOTICE: [script.luna] Trying to decode as: ASCII
21:24:32.381 T:1577055216  NOTICE: [script.luna] Trying to encode as specified in XML: UTF-16
21:24:32.452 T:1577055216  NOTICE: [script.luna] Trying to get information for game: Left 4 Dead 2
21:24:32.623 T:1577055216   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <class 'urllib2.HTTPError'>
                                            **Error Contents: HTTP Error 403: Forbidden**
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/script.luna/addon.py", line 203, in <module>
                                                game_controller.get_games()
                                              File "/home/osmc/.kodi/addons/script.luna/resources/lib/controller/gamecontroller.py", line 66, in get_games
                                                storage[nvapp.id] = self.scraper_chain.query_game_information(nvapp)
                                              File "/home/osmc/.kodi/addons/script.luna/resources/lib/scraper/scraperchain.py", line 23, in query_game_information
                                                game_info.append(Game.from_api_response(scraper.get_game_information(nvapp)))
                                              File "/home/osmc/.kodi/addons/script.luna/resources/lib/scraper/omdbscraper.py", line 26, in get_game_information
                                                response = self._gather_information(nvapp, request_name)
                                              File "/home/osmc/.kodi/addons/script.luna/resources/lib/scraper/omdbscraper.py", line 40, in _gather_information
                                                json_file = self._get_json_data(game_cache_path, game)
                                              File "/home/osmc/.kodi/addons/script.luna/resources/lib/scraper/omdbscraper.py", line 73, in _get_json_data
-------- HERE IS THE ISSUE -> json_response = json.load(urllib2.urlopen(self.api_url % game))
...
21:24:32.830 T:1958564784   ERROR: GetDirectory - Error getting plugin://script.luna/
21:24:32.830 T:1958564784   ERROR: CGUIMediaWindow::GetDirectory(plugin://script.luna/) failed
...

With the last dev release, I have the same problem.

I've done some research. The query:

http://www.omdbapi.com/?t=left4dead&plot=short&r=json&type=game

doesn't work right now. So the game info could not be got. I think you should skip this step if the service doesn't work, because else, the plugin could not be used util the game data is got.

Thank you!

Zelaf commented 7 years ago

Heads up, they recently released an update fixing some issues so manually search for updates :)

Also, sorry for not providing anything valuble to fixing the issue.

wackerl91 commented 7 years ago

Skipping API providers if they're not accessible for some reason is a valid request.

For now simply disable the OMDB Scraper in the settings as a workaround.

Edit: To me it looks like OMDB has filtered out all games. If someone can confirm this, the scraper will most likely be removed entirely, leaving only The Games DB and IGDB as an option.

posti85 commented 7 years ago

Did you mean setting default to false in this line?

<setting label="30025" enable="eq(-1,false)" type="bool" id="enable_omdb" default="false"/>

it didn't work for me.

wackerl91 commented 7 years ago

There's a settings item in Luna's main menu which opens ... well ... the add-on settings. Literally no need to change a single file by hand ...

wackerl91 commented 7 years ago

From the exceptions gathered by Eos: OMDB now returns HTTP Error 503: Service Unavailable instead of the aforementioned 403 - the entire scraper will be removed with the next update. To compensate this, I'm looking into enhancing Eos to provide proxied access to IGDB.

For now - as mentioned above - if you can't get a game list due to this circumstances just disable the OMDB scraper in Luna's settings.

TheBready commented 7 years ago

That fixed my issues. Thanks.