Open alexsamtw opened 5 years ago
I could not get the OAUTHTOKEN either.
I tried leaving it blank in the config file, the TOBOT fetch function returned the following:
2019-09-11 16:57:25,891 [INFO][TOBOT] Starting up.. (training: True, testing: True)
2019-09-11 16:57:25,891 [INFO][TOBOT] No TOBOT_OAUTHTOKEN in env, do you want me to get it?
(y/n) y
WARNING: DON'T GET OAUTHTOKEN TOO OFTEN!
2019-09-11 16:57:32,963 [DEBUG][urllib3.connectionpool] Starting new HTTPS connection (1): api.airbnb.com:443
2019-09-11 16:57:34,160 [DEBUG][urllib3.connectionpool] https://api.airbnb.com:443 "POST /v1/authorize HTTP/1.1" 420 None
Traceback (most recent call last):
File "airbnb_bot.py", line 791, in <module>
os.environ['TOBOT_OAUTHTOKEN'] = OAUTHTOKEN
File "/usr/lib/python3.6/os.py", line 674, in __setitem__
value = self.encodevalue(value)
File "/usr/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).__name__)
TypeError: str expected, not NoneType
Is it possible to get?
Hi @shirosaidev ~
I checked oauth_token function, and print body from "body = json.loads(src)" It's show... body:{'error_code': 420, 'error': 'unknown_error', 'error_message': 'Unable to perform action. Please try again through the website or contact support if you need immediate assistance.'}