Anki 2.1.52 Release Candidate

Meant to address it before rc2, but forgot to. @kleinerpirat has submitted a PR which I’ll get to soon.

I haven’t had a chance to investigate your BR issue yet. Does it occur in 2.1.49? If it’s not a newly introduced issue, then it would be better posted on a separate thread.

@abdo

It looks like the ‘drop in main window’ case was not covered in the PR, so that will always use the legacy importing path at the moment. If you use File>Import instead, you’ll get the new code if it is enabled.

The & symbol in math equation displays abnormally in editor and brower

Version 2.1.52 (63f05b2b)
Python 3.10.4 Qt 6.3.0 PyQt 6.3.0
ArchLinux

Would it be possible for Anki to remember how much zoom you want for the Browser and for the Edit and Add card dialogues?
On Anki 2.1.51 (qt6) I have to zoom out each time I open one of those windows and it’s very cumbersome (the default is much larger than in 2.1.49)

Similarly for the newly added Toggle Visual Editor button: Anki should remember if you want a field to be visible or not

I actually just double-clicked on the imported files. It seems this case is also not covered yet.

I’ve discovered some unexpected copy-and-paste behaviour. If you copy any text (in this case, 底稿) in the review screen, click on the Edit button in the lower-left-hand corner of the screen, then paste the copied text in a field, this is pasted: Version:0.9 StartHTML:0000000177 EndHTML:0000000795 StartFragment:0000000213 EndFragment:0000000759 SourceURL:http://127.0.0.1:57705/_anki/legacyPageData?id=1409223102320 底稿.

Paste without shift key strips formatting is enabled. The text above was pasted without the shift key (i.e. just with Ctrl+V).

Version ⁨2.1.52 (63f05b2b)⁩
Python 3.9.7 Qt 6.3.0 PyQt 6.3.0
Windows 11 Pro 21H2 (OS build 22000.652)

Reviews behave strangely when I use the space bar to show the back of the card and select Good. This appears to be a new bug introduced in 2.1.52 RC2 (EDIT: It’s happening in RC1 as well). It doesn’t happen when I click Show answer and Good or use the Enter/Return key to do the same thing. Reproduction steps:

  1. Start reviewing.
  2. Press the space bar to show the answer.
  3. Press the space bar to select Good. I assume this is still what happens, since the button isn’t highlighted any more.
  4. The front of the next card is meant to be displayed, but the front of the previous card is actually displayed.
  5. Hit space to show answer.
  6. The correct back is shown.

@dae, the email address associated with my Anki account is not the one I’m using here. If you’d like to test this, I can send you my email address and indicate which deck to test.

@temlivurki

  • Could you confirm if the br issue existed in 2.1.49?
  • The copying issue is a toolkit issue that should be fixed in either a future 2.1.52rc or 2.1.53.
  • It sounds like the update to Qt 6.3 is causing issues with your system’s video driver. Switching to ‘software’ may fix the issue: Display Issues - Anki Manual

@abdo, @cyl thanks, fixed :slight_smile:

@jcznk that sounds like it might be better addressed with Reduce font size of editor toolbar/field labels? · Issue #1792 · ankitects/anki · GitHub

I confirm that the break issue is present in 2.1.49. I used six notes to test the browser search and the search and replace functions.

  • Searching for <br> returns one note, while searching for either <br /> or <br/> returns the remaining five.
  • I can successfully search for and replace both <br> and <br/>, but I can’t do the same thing for <br />.
  • The HTML view of the relevant field in all of these notes displays <br>.
  • Pressing Enter/Return in a field consistently inserts <br> (as determined by searching in the browser), but some add-ons (in this case Advanced Copy Fields) and perhaps older versions of Anki (many of my notes containing <br /> were formatted in older versions of Anki without add-ons, i.e. exclusively by pressing Enter/Return) seem to use either <br/> or <br />, which are evidently treated differently by Anki’s search and search and replace functions.

As for the potential Qt 6.3 issue, I’ll give your suggested solution a try and report back. Do you have any idea why it would only happen when using the space bar, though?

@dae Do anki had any changes on exporting decks?

I’ve exported my deck and my media files didn’t get exported too.
Only works if I export my collection.

Version ⁨2.1.52 (a989e508)⁩

Tried on rc2 too. Same result

@gustavosmen If you enabled the new import/export code as described in the changelog, then the exporting process is different. If it’s missing media files, please let me know the deck and an example media file that’s not being included, and I’ll try to reproduce the problem. If you did not enable the new code, media exports breaking would be surprising. Did you confirm the resulting .apkg is too small to contain the media files? One other possible explanation is that the media was included, but is not being imported properly.

@temlivurki

When you edit a note, the HTML gets partially normalized, eg <br /> gets converted to <br>. This is a byproduct of the way the editor works, and not a deliberate thing we try to do. Find&replace should match whatever you provide it with; I suspect the confusion here is arising from the fact that the br tags are changing as you observe them. That’s why I suggested exporting to a text file, as that allows you to observe the underlying text without risk of it changing.

Re the spacebar, it seems like it’s an issue of the screen not being redrawn at the right time by the toolkit, and maybe when you use the mouse, it ends up triggering the refresh faster. No idea why enter would behave differently though. Assuming you’re not using type-in-the-answer and not using add-ons, the two keys should take the same path.

1 Like

Nevermind. I was startled by the size of the .apkg being so small - the file was supposed to be 22mb, but only 1mb was exported. I tested it in a virtual machine just now and it all worked out. Congratulations for the good work. You deserve. It’s brilliant.

1 Like

@Rumo deserves much of the credit :slight_smile:

4 Likes

Anki 2.1.52 RC2
MacOS 12.0.1

My Anki app keeps quitting unexpectedly (and gives me the message “Anki has quit unexpectedly”. I also cannot open Anki after it quits, and my Mac doesn’t show that Anki is running at all, so I am forced to restart my computer.

I am not able to pinpoint the cause right now. I think it’s happened twice shortly after closing the Add window, but not sure. I noticed this happened with 2.1.52 RC1, so then I decided to upgrade to RC2, but now it has happened again. I will update what I find.

Edit: I removed the icon from the dock (and recents dock). I also checked the /Applications and saw that Anki.app has a Date Modified date of May 2, 2022, which I thought was weird. So I tried double-click the rc2 .dmg file and drag it into /Applications folder and hit “replace”, but then it says:

The operation can’t be completed because the item “Anki.app” is in use.

Apparently if I use Activity Monitor app and close Anki there then it actually closes and be reopened. But it doesn’t show on the Force Quit option on Mac.

I’ve verified that the breaks don’t change unless I manually overwrite them. For example, in the cases where the field represents the break as <br />, it only changes to <br> if I delete the empty line and recreate it with the Enter/Return key. Just opening the note in the browser doesn’t appear to normalise these breaks.

As for exporting the relevant notes to a plain text file, I’m still not sure what I’m meant to be looking for, since the the breaks are converted to whitespace. Could you point me in the right direction?

2.1.52rc3 is now available:

https://betas.ankiweb.net/anki2.1.52.html#release-candidate-3

@blackace72 have you tried updating to the latest macOS?

@temlivurki If you export a text file with HTML included, the HTML is exactly how it is represented inside the fields, without any transformations that might occur when viewing the card in the browse screen. Looking at the text there will show you exactly what text you need to use in find&replace.

3 Likes

I can’t see the new RC3 in beta downloads.

1 Like

Thanks for the report, should be fixed now.

Would it be possible to add an option to keep flags when exporting even if scheduling is excluded? I found it really useful in a lot of situations in which i didn’t want to share my already studied cards but i still wanted to associate certain cards with flags to indicate certain things.

I’m not sure it’s a good idea, as flags mean different things to different people. Tagging the notes would be a better way to mark them in a way that can be understood by all.

I saw this post on Reddit and have the same question - is there a way to make it so the minimized images are a certain size? In many instances I prefer to have my images maximized or I want them very very small, etc. The old addons that did this used to have an option to toggle shrinking on and to choose what size it shrunk to.