Luux/ARBSMapDo

Error after about 50 to 70 songs detected

Closed this issue · 4 comments

The Error:
Found Levels: 52/200 | | # | 52 Elapsed Time: 0:00:15 Traceback (most recent call last): File "arbsmapdo.py", line 208, in <module> File "downloader.py", line 47, in start levels_to_download = self.fetch_and_filter() File "downloader.py", line 150, in fetch_and_filter if self._filter_level_with_beatsaver_info(level) is True: File "downloader.py", line 206, in _filter_level_with_beatsaver_info bs_metadata = bs_info["metadata"] KeyError: 'metadata' [11716] Failed to execute script arbsmapdo
This is checking for all ranked songs between 6 and 7 stars. The same thing also happened while filtering between 7 and 10 stars.

Luux commented

Hmm, I suspect that 1-2 levels on beatsaver may have missing information. I've encountered strange formats for some maps before, so that wouldn't be a surprise.

Can you try if the following version fixes that?
arbsmapdo.zip

Had the same error message, the version you uploaded worked for me, but it seems to be skipping a lot. 383 on 0.7 vote ratio.
console_log.txt

Luux commented

Thanks for the log. The info from beatsaver is an RATE_LIMIT_EXCEEDED error code. Seems like beatsaver doesn't like requesting info about so many songs. I'm quite curious why this never happened to me so far.
Unfortunately, last time I checked they did not have an option for requesting batches of songs. Maybe it's time to implement the caching using the scraped song data described in #6

As a workaround for the moment, you can download a smaller amount of songs and repeat the process after a few minutes. Songs that were already downloaded by ARBSMapDo will not be requested again, therefore it will download the skipped ones in the next attempt.

Luux commented

Hey again @germanoid @Surferlul,
I've just released 0.3.0 which includes the BeatSaver caching: https://github.com/Luux/ARBSMapDo/releases/tag/v0.3.1
This leads to a significant speedup and should fix the bug, as the BeatSaver-API will no longer be called for every map.

EDIT: I had to update the release due to a hotfix. If you already downloaded 0.3.0, please update to the new version.