awerchniak / viz_osrs

Visualize OSRS Statistics
0 stars 0 forks source link

HiScores information invalid for user "Tarvis Devor" #17

Open awerchniak opened 3 years ago

awerchniak commented 3 years ago

Currently, skill level/experience for "Tarvis Devor" are being displayed incorrectly for many of the options. The backend for this website relies on the HiScores API provided by JaGeX. From the investigation (pasted below), it looks like this bug is a result of an incorrect response from the service for this user. As we cannot correct the display/database until the API is fixed, we should at least display a banner with a link to this bug for now.

Evidence:

  1. screen shot of SaveOSRSMetricsLambda saving the malformed levels data SaveOSRSMetricsResultsLambda

  2. screen shot of GetAndParseOSRSMetricsLambda retrieving the malformed data from the API GetAndParseOSRSMetricsLambda

  3. Direct result from calling API manually contains the malformed data

>>> response = rs_api.process_hiscores_response(rs_api.request_hiscores(player="Tarvis Devor"))
>>> pprint.pprint(response)
{'activities': {'AbyssalSire': {'count': '-1', 'rank': '-1'},
                'AlchemicalHydra': {'count': '-1', 'rank': '-1'},
                'BarrowsChests': {'count': '-1', 'rank': '-1'},
                'BountyHunter_Hunter': {'count': '-1', 'rank': '-1'},
                'BountyHunter_Rogue': {'count': '-1', 'rank': '-1'},
                'Bryophyta': {'count': '-1', 'rank': '-1'},
                'Callisto': {'count': '-1', 'rank': '-1'},
                'Cerberus': {'count': '-1', 'rank': '-1'},
                'ChambersofXeric': {'count': '-1', 'rank': '-1'},
                'ChambersofXeric_ChallengeMode': {'count': '-1', 'rank': '-1'},
                'ChaosElemental': {'count': '-1', 'rank': '-1'},
                'ChaosFanatic': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_all': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_beginner': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_easy': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_elite': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_hard': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_master': {'count': '-1', 'rank': '-1'},
                'ClueScrolls_medium': {'count': '-1', 'rank': '-1'},
                'CommanderZilyana': {'count': '-1', 'rank': '-1'},
                'CorporealBeast': {'count': '-1', 'rank': '-1'},
                'CrazyArchaeologist': {'count': '-1', 'rank': '-1'},
                'DagannothPrime': {'count': '-1', 'rank': '-1'},
                'DagannothRex': {'count': '-1', 'rank': '-1'},
                'DagannothSupreme': {'count': '-1', 'rank': '-1'},
                'DerangedArchaeologist': {'count': '-1', 'rank': '-1'},
                'GeneralGraardor': {'count': '-1', 'rank': '-1'},
                'GiantMole': {'count': '-1', 'rank': '-1'},
                'GrotesqueGuardians': {'count': '-1', 'rank': '-1'},
                'Hespori': {'count': '-1', 'rank': '-1'},
                'KalphiteQueen': {'count': '-1', 'rank': '-1'},
                'KingBlackDragon': {'count': '-1', 'rank': '-1'},
                'Kraken': {'count': '-1', 'rank': '-1'},
                'KreeArra': {'count': '-1', 'rank': '-1'},
                'KrilTsutsaroth': {'count': '-1', 'rank': '-1'},
                'LMS_Rank': {'count': '-1', 'rank': '-1'},
                'LeaguePoints': {'count': '-1', 'rank': '-1'},
                'Mimic': {'count': '-1', 'rank': '-1'},
                'Nightmare': {'count': '-1', 'rank': '-1'},
                'Obor': {'count': '-1', 'rank': '-1'},
                'Sarachnis': {'count': '-1', 'rank': '-1'},
                'Scorpia': {'count': '-1', 'rank': '-1'},
                'Skotizo': {'count': '-1', 'rank': '-1'},
                'TheCorruptedGauntlet': {'count': '-1', 'rank': '-1'},
                'TheGauntlet': {'count': '-1', 'rank': '-1'},
                'TheatreofBlood': {'count': '-1', 'rank': '-1'},
                'ThermonuclearSmokeDevil': {'count': '-1', 'rank': '-1'},
                'TzKalZuk': {'count': '-1', 'rank': '-1'},
                'TzTokJad': {'count': '-1', 'rank': '-1'},
                'Venenatis': {'count': '-1', 'rank': '-1'},
                'Vetion': {'count': '-1', 'rank': '-1'},
                'Vorkath': {'count': '-1', 'rank': '-1'},
                'Wintertodt': {'count': '-1', 'rank': '-1'},
                'Zalcano': {'count': '-1', 'rank': '-1'},
                'Zulrah': {'count': '-1', 'rank': '-1'}},
 'player': 'Tarvis Devor',
 'skills': {'Agility': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Attack': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Construction': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Cooking': {'experience': '424602',
                        'level': '64',
                        'rank': '1184435'},
            'Crafting': {'experience': '38446',
                         'level': '40',
                         'rank': '1941809'},
            'Defence': {'experience': '80808',
                        'level': '47',
                        'rank': '1826306'},
            'Farming': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Firemaking': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Fishing': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Fletching': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Herblore': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Hitpoints': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Hunter': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Magic': {'experience': '616180', 'level': '68', 'rank': '1314094'},
            'Mining': {'experience': '60712', 'level': '44', 'rank': '1859907'},
            'Overall': {'experience': '0', 'level': '0', 'rank': '-1'},
            'Prayer': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Ranged': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Runecrafting': {'experience': '2450',
                             'level': '15',
                             'rank': '1471425'},
            'Slayer': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Smithing': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Strength': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Thieving': {'experience': '-1', 'level': '1', 'rank': '-1'},
            'Woodcutting': {'experience': '305227',
                            'level': '61',
                            'rank': '1312314'}},
 'timestamp': '2021-04-20 13:26:24'}
awerchniak commented 3 years ago

As mentioned above, our backend relies on the HiScores APIs. I didn't realize that JaGeX also has a website for displaying the HiScores info that we parse: https://secure.runescape.com/m=hiscore_oldschool/hiscorepersonal. On that site, as well, the information is wrong:

image

Since we've been using this as our source of ground truth, I think the best we can do here is to provide a banner/warning message to user. Or, find a better way to get current account information (how does RuneLite work?)