pmariglia / showdown

A Pokemon Showdown Battle Bot written in Python
GNU General Public License v3.0
254 stars 176 forks source link

LoginError? #87

Closed jia-19 closed 2 years ago

jia-19 commented 2 years ago

[ERROR] Login Unsuccessful Traceback (most recent call last): File "run.py", line 111, in asyncio.get_event_loop().run_until_complete(showdown()) File "C:\Users\admin\anaconda3\lib\asyncio\base_events.py", line 616, in run_until_complete return future.result() File "run.py", line 78, in showdown await ps_websocket_client.login() File "C:\Users\admin\showdown\showdown\websocket_client.py", line 91, in login raise LoginError("Could not log-in") showdown.websocket_client.LoginError: Could not log-in

I have an account and have inserted my entries for username and password, is there anything else I'm missing?

pmariglia commented 2 years ago

I cannot reproduce. Are there any other details in the log?

This usually just happens if you've entered the wrong password. Can you reproduce this with multiple different login accounts?

pmariglia commented 2 years ago

Hey @jia-19.

Any update on this?

pmariglia commented 2 years ago

Closing this.

Please feel free to re-open if you continue to have issues.

2201957 commented 1 month ago

[DEBUG] Logging in... [DEBUG] Received message from websocket: |updateuser| Guest 3|0|2|{"blockChallenges":false,"blockPMs":false,"ignoreTickets":false,"hideBattlesFromTrainerCard":false,"blockInvites":false,"doNotDisturb":false,"blockFriendRequests":false,"allowFriendNotifications":false,"displayBattlesToFriends":false,"hideLogins":false,"hiddenNextBattle":false,"inviteOnlyNextBattle":false,"language":null} |customgroups|[{"symbol":"&","name":"Administrator","type":"leadership"},{"symbol":"#","name":"Room Owner","type":"leadership"},{"symbol":"★","name":"Host","type":"leadership"},{"symbol":"@","name":"Moderator","type":"staff"},{"symbol":"%","name":"Driver","type":"staff"},{"symbol":"§","name":"Section Leader","type":"staff"},{"symbol":"*","name":"Bot","type":"normal"},{"symbol":"☆","name":"Player","type":"normal"},{"symbol":"+","name":"Voice","type":"normal"},{"symbol":"^","name":"Prize Winner","type":"normal"},{"symbol":"whitelist","name":"Whitelist","type":"normal"},{"symbol":" ","name":null,"type":"normal"},{"symbol":"‽","name":"Locked","type":"punishment"},{"symbol":"!","name":"Muted","type":"punishment"}] |formats|,LL|,1|S/V Singles|[Gen 9] Random Battle,f|[Gen 9] Unrated Random Battle,b|[Gen 9] Free-For-All Random Battle,7|[Gen 9] Random Battle (Blitz),f|[Gen 9] Multi Random Battle,5|[Gen 9] OU,e|[Gen 9] Ubers,e|[Gen 9] UU,e|[Gen 9] RU,e|[Gen 9] NU,e|[Gen 9] PU,e|[Gen 9] LC,e|[Gen 9] Monotype,e|[Gen 9] CAP,e|[Gen 9] BSS Reg G,5e|[Gen 9] BSS Reg H,5e|[Gen 9] Custom Game,c|,1|S/V Doubles|[Gen 9] Random Doubles Battle,f|[Gen 9] Doubles OU,e|[Gen 9] Doubles Ubers,e|[Gen 9] Doubles UU,e|[Gen 9] Doubles LC,c|[Gen 9] VGC 2023 Reg D,5c|[Gen 9] VGC 2024 Reg G,5e|[Gen 9] VGC 2024 Reg G (Bo3),1a|[Gen 9] VGC 2024 Reg H,5e|[Gen 9] VGC 2024 Reg H (Bo3),1a|[Gen 9] Doubles Custom Game,c|,1|Unofficial Metagames|[Gen 9] 1v1,e|[Gen 9] 2v2 Doubles,e|[Gen 9] Anything Goes,e|[Gen 9] Ubers UU,e|[Gen 9] ZU,e|[Gen 9] Free-For-All,6|[Gen 9] LC UU,c|[Gen 9] NFE,c|,1|Pet Mods|[Gen 6] Megas Revisited,e|[Gen 1] RBY CAP,e|[Gen 6] NEXT OU,8|,1|Draft|[Gen 9] Draft,8c|[Gen 9] 6v6 Doubles Draft,8c|[Gen 9] 4v4 Doubles Draft,dc|[Gen 9] NatDex Draft,8c|[Gen 9] NatDex 6v6 Doubles Draft,8c|[Gen 9] NatDex LC Draft,8c|[Gen 8] Galar Dex Draft,c|[Gen 8] NatDex Draft,c|[Gen 8] NatDex 4v4 Doubles Draft,1c|[Gen 7] Draft,c|[Gen 6] Draft,c|,2|OM of the Month|[Gen 9] Pokemoves,e|[Gen 9] Flipped,e|[Gen 9] Partners in Crime,e|,2|Other Metagames|[Gen 9] Almost Any Ability,e|[Gen 9] Balanced Hackmons,e|[Gen 9] Godly Gift,e|[Gen 9] Inheritance,e|[Gen 9] Mix and Mega,e|[Gen 9] Shared Power,e|[Gen 9] STABmons,e|[Gen 7] Pure Hackmons,e|,2|Challengeable OMs|[Gen 9] 350 Cup,c|[Gen 9] Camomons,c|[Gen 9] Category Swap,c|[Gen 9] Convergence,c|[Gen 9] Cross Evolution,c|[Gen 9] Fervent Impersonation,c|[Gen 9] Foresighters,c|[Gen 9] Fortemons,c|[Gen 9] Frantic Fusions,c|[Gen 9] Full Potential,c|[Gen 9] Pokebilities,c|[Gen 9] Pure Hackmons,c|[Gen 9] Revelationmons,c|[Gen 9] Sharing is Caring,c|[Gen 9] Tera Donation,c|[Gen 9] The Card Game,c|[Gen 9] The Loser's Game,c|[Gen 9] Trademarked,c|[Gen 9] Triples,c|[Gen 9] Type Split,c|[Gen 6] Pure Hackmons,c|,2|National Dex|[Gen 9] National Dex,e|[Gen 8] National Dex,e|,2|National Dex Other Tiers|[Gen 9] National Dex Ubers,e|[Gen 9] National Dex UU,e|[Gen 9] National Dex RU,e|[Gen 9] National Dex LC,c|[Gen 9] National Dex Monotype,e|[Gen 9] National Dex Doubles,e|[Gen 9] National Dex Ubers UU,c|[Gen 9] National Dex AG,c|[Gen 9] National Dex BH,c|[Gen 8] National Dex UU,c|[Gen 8] National Dex Monotype,c|,3|Randomized Format Spotlight|[Gen 9] CAP Random Battle,f|,3|Randomized Metas|[Gen 9] Random Roulette,d|[Gen 9] Super Staff Bros Ultimate,f|[Gen 9] Monotype Random Battle,f|[Gen 9] Random Battle Mayhem,f|[Gen 9] BSS Factory,1f|[Gen 9] Baby Random Battle,f|[Gen 9] Computer-Generated Teams,f|[Gen 9] Hackmons Cup,f|[Gen 9] Doubles Hackmons Cup,d|[Gen 9] Broken Cup,d|[Gen 9] Challenge Cup 1v1,f|[Gen 9] Challenge Cup 2v2,f|[Gen 9] Challenge Cup 6v6,d|[Gen 9] Metronome Battle,e|[Gen 8] Random Battle,f|[Gen 8] Random Doubles Battle,f|[Gen 8] Free-For-All Random Battle,7|[Gen 8] Multi Random Battle,5|[Gen 8] Battle Factory,f|[Gen 8] BSS Factory,1d|[Gen 8] Hackmons Cup,f|[Gen 8] Metronome Battle,c|[Gen 8] CAP 1v1,d|[Gen 8 BDSP] Random Battle,d|[Gen 7] Random Battle,f|[Gen 7] Battle Factory,f|[Gen 7] BSS Factory,1d|[Gen 7] Hackmons Cup,d|[Gen 7 Let's Go] Random Battle,d|[Gen 6] Random Battle,f|[Gen 6] Battle Factory,9|[Gen 5] Random Battle,f|[Gen 4] Random Battle,f|[Gen 3] Random Battle,f|[Gen 2] Random Battle,f|[Gen 1] Random Battle,f|[Gen 1] Challenge Cup,9|[Gen 1] Hackmons Cup,9|,4|RoA Spotlight|[Gen 1] Ubers,e|[Gen 1] PU,e|[Gen 2] ZU,e|[Gen 3] ZU,e|,4|Past Gens OU|[Gen 8] OU,e|[Gen 7] OU,e|[Gen 6] OU,e|[Gen 5] OU,e|[Gen 4] OU,e|[Gen 3] OU,e|[Gen 2] OU,e|[Gen 1] OU,e|,4|Past Gens Doubles OU|[Gen 8] Doubles OU,e|[Gen 7] Doubles OU,e|[Gen 6] Doubles OU,e|[Gen 5] Doubles OU,c|[Gen 4] Doubles OU,c|[Gen 3] Doubles OU,c|,4|Sw/Sh Singles|[Gen 8] Ubers,c|[Gen 8] UU,c|[Gen 8] RU,c|[Gen 8] NU,c|[Gen 8] PU,c|[Gen 8] LC,c|[Gen 8] Monotype,c|[Gen 8] 1v1,c|[Gen 8] Anything Goes,c|[Gen 8] ZU,c|[Gen 8] CAP,c|[Gen 8] Battle Stadium Singles,5c|[Gen 8 BDSP] OU,c|[Gen 8 BDSP] Ubers,c|[Gen 8] Custom Game,c|,4|Sw/Sh Doubles|[Gen 8] Doubles Ubers,c|[Gen 8] Doubles UU,c|[Gen 8] VGC 2022,5c|[Gen 8] VGC 2021,5c|[Gen 8] VGC 2020,5c|[Gen 8 BDSP] Doubles OU,c|[Gen 8 BDSP] Battle Festival Doubles,1c|[Gen 8] Doubles Custom Game,c|,4|US/UM Singles|[Gen 7] Ubers,c|[Gen 7] UU,c|[Gen 7] RU,c|[Gen 7] NU,c|[Gen 7] PU,c|[Gen 7] LC,c|[Gen 7] Monotype,c|[Gen 7] 1v1,c|[Gen 7] Anything Goes,c|[Gen 7] ZU,c|[Gen 7] CAP,c|[Gen 7] Battle Spot Singles,5c|[Gen 7 Let's Go] OU,1c|[Gen 7] Custom Game,c|,4|US/UM Doubles|[Gen 7] Doubles UU,c|[Gen 7] VGC 2019,5c|[Gen 7] VGC 2018,5c|[Gen 7] VGC 2017,5c|[Gen 7] Battle Spot Doubles,5c|[Gen 7 Let's Go] Doubles OU,c|[Gen 7] Doubles Custom Game,c|,4|OR/AS Singles|[Gen 6] Ubers,c|[Gen 6] UU,c|[Gen 6] RU,c|[Gen 6] NU,c|[Gen 6] PU,c|[Gen 6] LC,c|[Gen 6] Monotype,c|[Gen 6] 1v1,c|[Gen 6] Anything Goes,c|[Gen 6] ZU,c|[Gen 6] CAP,c|[Gen 6] Battle Spot Singles,5c|[Gen 6] Custom Game,c|,4|OR/AS Doubles/Triples|[Gen 6] VGC 2016,5c|[Gen 6] VGC 2015,5c|[Gen 6] VGC 2014,5c|[Gen 6] Battle Spot Doubles,5c|[Gen 6] Doubles Custom Game,c|[Gen 6] Battle Spot Triples,1c|[Gen 6] Triples Custom Game,c|,4|B2/W2 Singles|[Gen 5] Ubers,c|[Gen 5] UU,c|[Gen 5] RU,c|[Gen 5] NU,c|[Gen 5] PU,c|[Gen 5] LC,c|[Gen 5] Monotype,c|[Gen 5] 1v1,c|[Gen 5] ZU,c|[Gen 5] CAP,c|[Gen 5] BW1 OU,c|[Gen 5] GBU Singles,5c|[Gen 5] Custom Game,c|,4|B2/W2 Doubles|[Gen 5] VGC 2013,5c|[Gen 5] VGC 2012,5c|[Gen 5] VGC 2011,5c|[Gen 5] Doubles Custom Game,c|[Gen 5] Triples Custom Game,c|,4|DPP Singles|[Gen 4] Ubers,c|[Gen 4] UU,c|[Gen 4] NU,c|[Gen 4] PU,c|[Gen 4] LC,c|[Gen 4] Anything Goes,c|[Gen 4] 1v1,c|[Gen 4] ZU,c|[Gen 4] CAP,c|[Gen 4] Custom Game,c|,4|DPP Doubles|[Gen 4] VGC 2010,1c|[Gen 4] VGC 2009,1c|[Gen 4] Doubles Custom Game,c|,4|Past Generations|[Gen 3] Ubers,c|[Gen 3] UU,c|[Gen 3] RU,c|[Gen 3] NU,c|[Gen 3] PU,c|[Gen 3] LC,c|[Gen 3] 1v1,c|[Gen 3] Custom Game,c|[Gen 3] Doubles Custom Game,c|[Gen 2] Ubers,c|[Gen 2] UU,c|[Gen 2] NU,c|[Gen 2] PU,c|[Gen 2] 1v1,c|[Gen 2] NC 2000,c|[Gen 2] Stadium OU,c|[Gen 2] Custom Game,c|[Gen 1] UU,c|[Gen 1] NU,c|[Gen 1] 1v1,c|[Gen 1] ZU,c|[Gen 1] Japanese OU,c|[Gen 1] Stadium OU,c|[Gen 1] Tradebacks OU,c|[Gen 1] NC 1997,c|[Gen 1] Custom Game,c [DEBUG] Received message from websocket: |challstr|4|a1aa7cb385d7b7ab382d5e82d9d49a2193fe13fe037595361e1225f4b83aa832f73b17583f8ac993903768ee056a308b78958676b79bf90033bb0e593c6c34463d78e52707314ae4afe23aec185003bfcf00383089045fde97ec669d7f95b6adff0ee90d6005a347fdd6f16ba2bf91b914e2268c506bf3f4028658d28e5491e2 [DEBUG] Encoding detection: %s is most likely the one. [DEBUG] Encoding detection: %s is most likely the one. [DEBUG] Encoding detection: %s is most likely the one. [DEBUG] Encoding detection: %s is most likely the one. [ERROR] Traceback (most recent call last): File "/home/zht1804/czh/poke/showdownserver/run.py", line 103, in asyncio.run(showdown()) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/zht1804/czh/poke/showdownserver/run.py", line 61, in showdown await ps_websocket_client.login() File "/home/zht1804/czh/poke/showdownserver/showdown/websocket_client.py", line 88, in login response_json = json.loads(response.text[1:]) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[DEBUG] Encoding detection: %s is most likely the one. [DEBUG] Encoding detection: %s is most likely the one. [DEBUG] Encoding detection: %s is most likely the one. [DEBUG] Encoding detection: %s is most likely the one. Traceback (most recent call last): File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/zht1804/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in cli.main() File "/home/zht1804/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main run() File "/home/zht1804/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file runpy.run_path(target, run_name="main") File "/home/zht1804/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path return _run_module_code(code, init_globals, run_name, File "/home/zht1804/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code _run_code(code, mod_globals, init_globals, File "/home/zht1804/.vscode-server/extensions/ms-python.debugpy-2024.10.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code exec(code, run_globals) File "/home/zht1804/czh/poke/showdownserver/run.py", line 103, in asyncio.run(showdown()) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/zht1804/czh/poke/showdownserver/run.py", line 61, in showdown await ps_websocket_client.login() File "/home/zht1804/czh/poke/showdownserver/showdown/websocket_client.py", line 88, in login response_json = json.loads(response.text[1:]) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/zht1804/zht/anaconda3/envs/pokemon/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I meet the simliar problem when logging