prestonfick / Echo2Wunderlist

Simple Python script to move items from your Echo lists in to specified Wunderlists
3 stars 0 forks source link

Can't login #1

Open prestonfick opened 8 years ago

prestonfick commented 8 years ago

Amazon has changed the way that they allow a login for this undocumented API, so when PyEcho attempts to login it fails.

saqebakhter commented 7 years ago

Getting an error as well :

Error logging in! Got status 200 Setting up client session to Wunderlist... Found Wunderlist Shopping List: xxxx Found Wunderlist To-do List: xxxxx Looking for new Echo Items... Unexpected error No email provided for crash notification Traceback (most recent call last): File "Echo2Wunderlist.py", line 149, in echo2wunderlist_scheduler.run() File "/usr/lib/python2.7/sched.py", line 117, in run action(*argument) File "Echo2Wunderlist.py", line 117, in echo2wunderlist shopping_items = echo.shoppingitems() File "./PyEcho/PyEcho.py", line 65, in shoppingitems return json.loads(items.text)['values'] File "/usr/lib/python2.7/json/init.py", line 339, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

prestonfick commented 7 years ago

Yeah - that's the one. I haven't had the chance to figure out why this is happening but it seems like it could be an error in the PyEcho project, and it hasn't been updated. It's the way that it's doing the screen scrape that has somehow changed on the Alexa login screen. Unfortunately that's what we get for hacking the login and using undocumented APIs. This worked well (when it worked) so I'd like to get this back up and running. I was also making a change to the parameters so this could be easily deployed and run in Heroku too. If you discover the reason for the error let me know and we can work to get this back up and running.

saqebakhter commented 7 years ago

Yeah - it's an issue on the PyEcho side - I'll have to debug it some more when I get some time. I was using IFTT > Maker Web Request but it stopped working (the recipe from Amazon side wasn't being triggered anymore).

So I found this - I'll try and get this to work again when I have some time.

isaac-jordan commented 7 years ago

@saqebakhter Did you manage to look at this, or find an alternative solution? :)

prestonfick commented 7 years ago

Sorry. It looks like PyEcho development has gone a bit stale, but that is where the issue lies. This was really awesome when it worked so I will fix it at some point, and I want to make easy to put it up on Heroku too. I just don't know when I'll have time to devote to it at the moment.

isaac-jordan commented 7 years ago

Do you have a hypothesis of how to get around this without using PyEcho? I have experience with Python, and willing to contribute back if I develop a solution :)

isaac-jordan commented 7 years ago

Hey, seems some people using PyEcho have found a solution to a login problem by changing the User Agent, see https://github.com/scotttherobot/PyEcho/issues/4. Is this the same error that users of this report are getting (I haven't tested out it yet :))?

prestonfick commented 7 years ago

I just tried renaming it - I'm not sure if this is white or blacklisted from Amazon, so I'll need to look deeper - but it is not finding the x-amzn-requestid that it expects in the header for the return of a successful login() call with the existing User-Agent, or one that's renamed.

liquidox commented 7 years ago

Any luck on this? Would love to be able to use this.

isaac-jordan commented 7 years ago

ITTT support launched in the UK which lets you hook up the native ToDo app with Wunderlist. But if you're in a country that ITTT doesn't support, you'll still need this project.