Closed xd-Neji closed 4 years ago
Should be fixed already, see #85. Could you try with the latest 1.2.2 release?
I'm getting the same error. Using the code from master
(cloned into /Users/ben/Library/Application\ Support/Anki2/addons21
. Using the latest version of Anki (Version 2.1.35 (84dcaa86), Python 3.8.0 Qt 5.14.2 PyQt 5.14.2).
I have tried logging in with username+password, and email+password. Same error both times.
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.2
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-10-07 09:16:46
Add-ons possibly involved: memrise2anki-extension
Caught exception:
Traceback (most recent call last):
File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/importer.py", line 214, in accept
if self.memriseService.login(self.usernameLineEdit.text(),self.passwordLineEdit.text()):
File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/memrise.py", line 823, in login
for field in form.find_all("input"):
AttributeError: 'NoneType' object has no attribute 'find_all'
EDIT: Looks like memrise have an updated login URL: app.memrise.com/signin
, plus, the auth is no longer done via a form but API call.
@benwoodward The issue author was using an older version of the addon, so his bug has been fixed already. But as you mentioned, it looks as memrise changed the login again. And thank you for the edit, I just made the same findings. But no idea at the moment what kind of authentication they are using...
Just now I was having this issue, using release 1.2.2. I think I was able to fix it by changing the url at https://github.com/wilddom/memrise2anki-extension/blob/fc63080f65fc9eee2a3d15928332862acc262d90/memrise.py#L818 such that "www" is replaced with "app". Looking at the merged pull requests, this seems to already have been fixed, but the master branch still has the old URL.
I'm currently converting a rather large set, so I'll edit this post when that's done if there are any other errors that pop up.
EDIT: I got another runtime error, but fixed it by running :%s/www\.memrise/app\.memrise/g
(replacing all instances of www
in the url with app
) in memrise.py. I've just downloaded a 2000+ card deck with this, and so far it seems that good things do indeed come to those who wait. Thanks so much for making this!
such that "www" is replaced with "app". Looking at the merged pull requests, this seems to already have been fixed, but the master branch still has the old URL.
I'm sure I tried this, but just tried again and now it's working. Hm..!
Now I have a different error:
Caught exception:
Traceback (most recent call last):
File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/importer.py", line 849, in importCourse
raise exc_info[0](exc_info[1]).with_traceback(exc_info[2])
File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/importer.py", line 150, in run
course = self.memriseService.loadCourse(self.url, MemriseCourseLoader.Observer(self))
File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/memrise.py", line 845, in loadCourse
return courseLoader.loadCourse(self.getCourseIdFromUrl(url))
File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/memrise.py", line 610, in loadCourse
course.title = sanitizeName(courseData["session"]["course"]["name"], "Course")
TypeError: 'NoneType' object is not subscriptable
such that "www" is replaced with "app". Looking at the merged pull requests, this seems to already have been fixed, but the master branch still has the old URL.
I'm sure I tried this, but just tried again and now it's working. Hm..!
Now I have a different error:
Caught exception: Traceback (most recent call last): File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/importer.py", line 849, in importCourse raise exc_info[0](exc_info[1]).with_traceback(exc_info[2]) File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/importer.py", line 150, in run course = self.memriseService.loadCourse(self.url, MemriseCourseLoader.Observer(self)) File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/memrise.py", line 845, in loadCourse return courseLoader.loadCourse(self.getCourseIdFromUrl(url)) File "/Users/ben/Library/Application Support/Anki2/addons21/memrise2anki-extension/memrise.py", line 610, in loadCourse course.title = sanitizeName(courseData["session"]["course"]["name"], "Course") TypeError: 'NoneType' object is not subscriptable
I did this same thing, but with all occurrences in that file and I was able to download successfully.
Can you PR your code please @d-allison ?
Haha, I'd love to but I'll have to figure out how to do that! I'm familiar with git but not so much with GitHub.
I just did a find and replace on the whole file memrise.py
and it seems to be working. But I don't want to assume that every URL is app.memrise
, and worried that this could cause other issues. I'll submit a PR, @wilddom could you take a look and make sure I'm not breaking anything?
@benwoodward @d-allison Thanks guys! Looks like www.memrise.com/login forwards to app.memrise.com/signin but app.memrise.com/login doesn't, funny enough. Let's hope they won't deactivate the old login page. But I will have a look at the PR as soon as I have a free minute.
@benwoodward @d-allison Thanks guys! Looks like www.memrise.com/login forwards to app.memrise.com/signin but app.memrise.com/login doesn't, funny enough. Let's hope they won't deactivate the old login page. But I will have a look at the PR as soon as I have a free minute.
Yeah, I wouldn't expect it to remain that way for long. Seems like they have rebuilt the site and are in the process of transitioning.
Hello, how are you? I am new here and just instaled memrise to anki add on and can't login. What should I do? I am afraid that I don't understand where I should eplace on the whole file memrise.py to app.memrise. (I am not familiar with programming). Thank you
Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeat until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. Debug info: Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-10-05 00:02:12
Caught exception: Traceback (most recent call last): File "C:\Users\Necip\AppData\Roaming\Anki2\addons21\memrise2anki-extension\importer.py", line 214, in accept if self.memriseService.login(self.usernameLineEdit.text(),self.passwordLineEdit.text()): File "C:\Users\Necip\AppData\Roaming\Anki2\addons21\memrise2anki-extension\memrise.py", line 777, in login for field in form.find_all("input"): AttributeError: 'NoneType' object has no attribute 'find_all'