fut
fut copied to clipboard
KeyError in Core.py
I can easily reproduce this issue if a session could not be set up due to a session which is not ended. Moreover, there are many other places in core.py where json would encounter this KeyError problem.
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1599, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1026, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/me/Desktop/fifa/fut/tests/mytest.py", line 38, in <module>
session = fut.Core('mail', 'pass', 'secret', platform='xbox', sms=False)
File "/Users/me/Desktop/fifa/fut/fut/core.py", line 294, in __init__
self.__launch__(email, passwd, secret_answer, platform=platform, code=code, totp=totp, sms=sms, emulate=emulate, proxies=proxies)
File "/Users/me/Desktop/fifa/fut/fut/core.py", line 599, in __launch__
if self._usermassinfo['settings']['configs'][2]['value'] == 0:
KeyError: 'settings'
due to a session which is not ended.
What exactly do You mean, how can i reproduce this error on latest version?
Sorry, I cannot remember clearly how this was reproduced, but roughly, you can start a session and handle some chores. Then, you can start another one without ending the first one. Maybe there would be some issues with the first one.
Btw, thanks so much for your library! I've developed an auto buyer script to help me buy the cheapest player I want!
Then, you can start another one without ending the first one. Maybe there would be some issues with the first one.
If You do this, or simply click button on webapp opened in browser there's gonna be MultipleSession exception. My guess is that You've created another session when fut was still launching so no need to fix this.
I get the same error here, trying to integrate kirovs anticaptcha solving. My try looks like:
session = fut.Core(...)
... doing requests until captcha...
except Captcha:
delete session
session = fut.Core(...)
The second call to fut.Core() raises keyerror 'settings'... Do you have a clue about that?
EDIT: starting a new session with delete and a second call to fut.Core() succeeds, if no captcha error was received in the old session...
@likegliss Yes, session is not property deleted after catcha raised so i don't recommend not use it for now, we need little bit more work here.
@oczkers the latest release seems to solve this issue...