• 1
  • 152
  • 153
  • 154
  • 155
  • 156(current)
Beta Advanced Emulator Launcher - Multi-emulator frontend for Kodi
Hello, 

I'm trying to run a scraper for one of my ROMs but it keeps failing with this error in the log.  I added the logging for asset_info_id -- it seems like the asset_dir is not getting populated.  Does anyone know what needs to be set for it to know where to save them?  I've configured local paths in the add-on settings for category, launcher, and collections.

Code:

2024-04-02 22:05:02.233 T:4422    DEBUG <general>: [script.akl.mobygames] akl.scrapers: Scraper applied? True
2024-04-02 22:05:02.233 T:4422    DEBUG <general>: [script.akl.mobygames] akl.scrapers: Processing asset actions...
2024-04-02 22:05:02.233 T:4422    DEBUG <general>: [script.akl.mobygames] akl.scrapers: asset_info_id: title, asset_dir_FN: None
2024-04-02 22:05:02.235 T:4422    ERROR <general>: [script.akl.mobygames] akl.scrapers: Could not scrape "Super Mario World"
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 372, in process_single_rom
                                                       self._process_ROM(rom)
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 432, in _process_ROM
                                                       self._process_ROM_assets(rom)
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 490, in _process_ROM_assets
                                                       asset_path = self._scrap_ROM_asset(asset_id, self.local_asset_list[asset_id], rom)
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 790, in _scrap_ROM_asset
                                                       asset_path_noext_FN = asset_dir_FN + text.str_to_filename_str(rom.get_identifier())
                                                   TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Reply
(2024-04-03, 05:26)ixarka Wrote: Hello, 

I'm trying to run a scraper for one of my ROMs but it keeps failing with this error in the log.  I added the logging for asset_info_id -- it seems like the asset_dir is not getting populated.  Does anyone know what needs to be set for it to know where to save them?  I've configured local paths in the add-on settings for category, launcher, and collections.

Code:

2024-04-02 22:05:02.233 T:4422    DEBUG <general>: [script.akl.mobygames] akl.scrapers: Scraper applied? True
2024-04-02 22:05:02.233 T:4422    DEBUG <general>: [script.akl.mobygames] akl.scrapers: Processing asset actions...
2024-04-02 22:05:02.233 T:4422    DEBUG <general>: [script.akl.mobygames] akl.scrapers: asset_info_id: title, asset_dir_FN: None
2024-04-02 22:05:02.235 T:4422    ERROR <general>: [script.akl.mobygames] akl.scrapers: Could not scrape "Super Mario World"
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 372, in process_single_rom
                                                       self._process_ROM(rom)
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 432, in _process_ROM
                                                       self._process_ROM_assets(rom)
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 490, in _process_ROM_assets
                                                       asset_path = self._scrap_ROM_asset(asset_id, self.local_asset_list[asset_id], rom)
                                                     File "/storage/.kodi/addons/script.module.akl/lib/akl/scrapers.py", line 790, in _scrap_ROM_asset
                                                       asset_path_noext_FN = asset_dir_FN + text.str_to_filename_str(rom.get_identifier())
                                                   TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
This is the AEL thread and you are posting an issue with AKL. Similar, but different thing Wink.
Check this thread for AKL: https://forum.kodi.tv/showthread.php?tid=366351 and post further messages there to keep this thread clean for AEL.

Post your versions of used addons too. Quickly looking at it I think you might not have set your assets path correctly for the collection. Open up your rom collection context menu and go through the menu. There is an option to set the ROM assets path (that is the main directory for all the assets for the ROMs iin that particular collection) and that is either not set or incorrect. 

Take notice, there is a big major beta release currently for AKL with lots of changes. Mixing up beta and stable releases of the addons might cause unexpected behavior.
Reply
(2024-04-05, 11:01)chrisism Wrote: Post your versions of used addons too. Quickly looking at it I think you might not have set your assets path correctly for the collection. Open up your rom collection context menu and go through the menu. There is an option to set the ROM assets path (that is the main directory for all the assets for the ROMs iin that particular collection) and that is either not set or incorrect. 

Take notice, there is a big major beta release currently for AKL with lots of changes. Mixing up beta and stable releases of the addons might cause unexpected behavior.
Sorry for posting in the wrong forum!  Anyway, you helped me sort out my issue.  This rom was originally set up as a standalone rom and I couldn't figure out how to set the asset path for it.  When I created a ROM collection and set the path there, everything worked.

Although I think there is a small bug in the mobygames scraper here:
Quote:    def resolve_asset_URL(self, selected_asset, status_dic):
        # Transform http to https
        url = selected_asset['url']
        if url[0:4] == 'http':
            url = 'https' + url[4:]
        url_log = self._clean_URL_for_log(url)

        return url, url_log
If the url returns is already prefixed with https, this logic causes the returned url to say "httpss" which causes all of the downloads to fail.  Eg:
Quote:requests.exceptions.InvalidSchema: No connection adapters were found for 'httpss://cdn.mobygames.com/covers/4040161-super-mario-bros-3-nes-media.jpg'
I locally patched it to do this instead and it works great now:
Quote:if url[0:4] == 'http' and url[4] != 's':
Reply
(2024-04-11, 05:05)ixarka Wrote:
(2024-04-05, 11:01)chrisism Wrote: Post your versions of used addons too. Quickly looking at it I think you might not have set your assets path correctly for the collection. Open up your rom collection context menu and go through the menu. There is an option to set the ROM assets path (that is the main directory for all the assets for the ROMs iin that particular collection) and that is either not set or incorrect. 

Take notice, there is a big major beta release currently for AKL with lots of changes. Mixing up beta and stable releases of the addons might cause unexpected behavior.
Sorry for posting in the wrong forum!  Anyway, you helped me sort out my issue.  This rom was originally set up as a standalone rom and I couldn't figure out how to set the asset path for it.  When I created a ROM collection and set the path there, everything worked.

Although I think there is a small bug in the mobygames scraper here:
Quote:    def resolve_asset_URL(self, selected_asset, status_dic):
        # Transform http to https
        url = selected_asset['url']
        if url[0:4] == 'http':
            url = 'https' + url[4:]
        url_log = self._clean_URL_for_log(url)

        return url, url_log
If the url returns is already prefixed with https, this logic causes the returned url to say "httpss" which causes all of the downloads to fail.  Eg:
Quote:requests.exceptions.InvalidSchema: No connection adapters were found for 'httpss://cdn.mobygames.com/covers/4040161-super-mario-bros-3-nes-media.jpg'
I locally patched it to do this instead and it works great now:
Quote:if url[0:4] == 'http' and url[4] != 's':

Thanks for the update. I applied the fix and rolled it out in the RC.
Reply
  • 1
  • 152
  • 153
  • 154
  • 155
  • 156(current)

Logout Mark Read Team Forum Stats Members Help
Advanced Emulator Launcher - Multi-emulator frontend for Kodi12