Open Tonemon opened 3 years ago
INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: api.amazon.com
After looking a bit closer in the code and errors I noticed that the connections to api.amazon.com
are somehow being dropped and because of that, it does not receive a response, which causes this error. I find it weird that connections are being dropped when starting alexa in a detached screen at boot, but it works just fine when you start it via a SSH connection.
I get the following INFO message when running from a SSH connection:
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.amazon.com
Does someone know how to fix it?
Description
Hi, I just picked up this project after a while and I am trying to make this script working on boot. I started with the information from #26 where @xiongyihui said to add it to the
autorun.sh
file.What I Did
autorun.sh
:run_alexa.sh
and added the following lines:echo "run_alexa.sh: Starting 5 sec sleep process..." > /dev/console sleep 5
echo "run_alexa.sh: done sleeping, running alexa in screen: sleepyalexa..." > /dev/console echo "run_alexa.sh: to access this screen, type screen -r" > /dev/console screen -dm -S sleepyalexa ash -c "alexa"
WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} ERROR:avs.alexa:'Response' object has no attribute 'status' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 110, in run self._run() File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 129, in _run headers = {'authorization': 'Bearer {}'.format(self.token)} File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 360, in token "refresh token request returned {}".format(response.status)) AttributeError: 'Response' object has no attribute 'status' INFO:avs.alexa:Refreshing access_token WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: api.amazon.com WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} ERROR:avs.alexa:'Response' object has no attribute 'status' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 110, in run self._run() File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 129, in _run headers = {'authorization': 'Bearer {}'.format(self.token)} File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 360, in token "refresh token request returned {}".format(response.status)) AttributeError: 'Response' object has no attribute 'status' INFO:avs.alexa:Refreshing access_token WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} INFO:requests.packages.urllib3.connectionpool:Resetting dropped connection: api.amazon.com WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} WARNING:avs.alexa:{"error_description":"The request has an invalid grant parameter : refresh_token","error":"invalid_grant"} ERROR:avs.alexa:'Response' object has no attribute 'status' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 110, in run self._run() File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 129, in _run headers = {'authorization': 'Bearer {}'.format(self.token)} File "/usr/lib/python2.7/site-packages/avs/alexa.py", line 360, in token "refresh token request returned {}".format(response.status)) AttributeError: 'Response' object has no attribute 'status'