TiddlyRemember 1.3.0 released

I think you misread the version for TiddlyWiki as being the version for Anki. The compatibility indicator on the TiddlyRemember homepage says Anki >= 2.1.45 is required.

You almost made it! You need to upgrade the TR plugin at this point so that you have the latest version of both. Since the new plugin actually requires >= 2.1.45 (there is a clean break in compatible versions because of breaking changes made in Anki), you prevented yourself from installing the latest version of the plugin by downgrading Anki.

From the anki page:

Supported Anki versions:

  • 2.1.24-2.1.27 (updated 2020-06-02)
  • 2.1.28-2.1.44 (updated 2020-12-22)
  • 2.1.45-2.1.49+ (updated 2021-11-14)

Ah, I can see how that would be confusing if you aren’t too familiar with Anki add-ons. Those are called branches – they’re older versions of the add-on that AnkiWeb has archived for the benefit of users who have older versions of Anki. You can see that the second branch, which lined up with the version of Anki you were using, hasn’t been updated since late 2020.

So it’s technically correct, in AnkiWeb’s mind, to say TiddlyRemember is still compatible with 2.1.33…but you won’t be getting the latest version that was announced in this thread.

2.1.48. Plugin updated.

But I notice that the password isn’t retained when I go in and out of the configuration form.

Then it gives me an error when I try to sync. Somewhere in all the text it suggests that I didn’t provide a password. The command line it shows doesn’t show the password being passed, so I guess the password isn’t being saved or used in rendering.

Using a permalink, the tiddler link portion is trimmed off and only the base TW file is opened.

My apologies, I seem to have totally missed this in my email and I haven’t visited the forum on the web for a little while! I’m assuming you’re still having this issue?

Can you include the full text of the error when syncing and the exact settings you’re using? I am not able to reproduce either the password not being retained or the permalink issue. Also, what operating system are you using? I don’t think that should make a difference, but it has in the past in a few cases :slight_smile:

This is linux. Anki 2.1.48. I’m pretty sure that the problem is that the password isn’t retained. It disappears after closing the configuration and then re-opening. All the other fields (e.g. path, permalink) remain populated. Only the password disappears.

Thanks!

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.48 (fb07bad3) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
Platform: Linux
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2021-12-14 21:04:12
Add-ons possibly involved: ⁨TiddlyRemember⁊

Caught exception:
Traceback (most recent call last):
  File "/home/mark/.local/share/Anki2/addons21/60456529/twimport.py", line 71, in _invoke_tw_command
    proc = subprocess.run(cmd, cwd=wiki_path, stdout=subprocess.PIPE,
  File "subprocess.py", line 512, in run
subprocess.CalledProcessError: Command '['tiddlywiki', '--load', '/media/mark/Working/Wikis/notes-2020/notes2020.html', '--savewikifolder', '/tmp/tmp98erue_m/wikifolder']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mark/.local/share/Anki2/addons21/60456529/importer.py", line 185, in join_thread
    if self.handle_thread_exception():
  File "/home/mark/.local/share/Anki2/addons21/60456529/importer.py", line 173, in handle_thread_exception
    raise exc
  File "/home/mark/.local/share/Anki2/addons21/60456529/importer.py", line 57, in run
    self.notes = twimport.find_notes(
  File "/home/mark/.local/share/Anki2/addons21/60456529/twimport.py", line 219, in find_notes
    _folderify_wiki(tw_binary, wiki_path, wiki_folder, password)
  File "/home/mark/.local/share/Anki2/addons21/60456529/twimport.py", line 62, in _folderify_wiki
    _invoke_tw_command(cmd, None, "folderify wiki")
  File "/home/mark/.local/share/Anki2/addons21/60456529/twimport.py", line 85, in _invoke_tw_command
    raise RenderingError(
60456529.oops.RenderingError: Failed to folderify wiki: return code 1.
(If this wiki is encrypted, did you forget to give the password?)
$ tiddlywiki --load /media/mark/Working/Wikis/notes-2020/notes2020.html --savewikifolder /tmp/tmp98erue_m/wikifolder

e[1;31mError: No tiddlers found in file "/media/mark/Working/Wikis/notes-2020/notes2020.html"e[0m

I agree that the problem appears to be that the password isn’t getting retained, but I’m still not able to reproduce that behavior using Anki 2.1.48 on Linux. When I add a password and click OK, it’s still there when I reopen the dialog box, and it also appears as expected in the add-on’s meta.json file.

To be positive we’re on the same plugin version, if you select TiddlyRemember in the add-ons dialog, choose View Files, open util.py, and look at line 14, does it say the plugin version is 1.3.1? (I doubt this is the problem because AFAIK there was never any released version that had a particular issue with this, but doesn’t hurt to be sure.)

Can you possibly record a short video showing exactly where you’re clicking/typing to make this behavior happen? Or describe it in words but in extreme detail?

Doesn’t appear in my meta.json

Yes.

anki

This video shows the password being populated. Then back to prior dialog. Then open the config again – password is missing.

Thanks

I found the problem and have opened an issue here:

In the meantime, you can work around this by adding a new wiki in the config dialog and copying all of your settings to it, then deleting the old one.

Thanks for your patience!

Would it be possible to just hand-edit the meta.json file? In which case, what is the name of the password attribute?

Thanks!

I haven’t tried it, but I’d assume that would work too. It’s just called password (make sure it’s within the object for the wiki you’re changing).

For what it’s worth, that didn’t work.

But deleting and recreating the wiki configuration did! So that’s progress!

Should I expect that the permalink will go to a tiddlywiki permalink (including the tiddler), or that it will just go to the tiddlywiki file? On mine there is no permalink portion.

Thanks!

It should go directly to the tiddler. Can you open a new issue for this on the GitHub page? I have a vague recollection of this problem, but I couldn’t find anything in the commit log so I’m not sure where I ended up on it.

Hi Sobjorn. I am encountering an error while using TiddlyRemember plugin and I am looking for a hint on how to fix it. This appears when I try to sync from TiddlyWiki:

Debug info:
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-12-26 12:12:46
Add-ons possibly involved: ⁨TiddlyRemember⁊

Caught exception:
Traceback (most recent call last):
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/importer.py", line 185, in join_thread
    if self.handle_thread_exception():
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/importer.py", line 173, in handle_thread_exception
    raise exc
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/importer.py", line 57, in run
    self.notes = twimport.find_notes(
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 250, in find_notes
    notes = _notes_from_paths(
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 112, in _notes_from_paths
    notes.update(_notes_from_tiddler(tid_text, wiki, tid_name, warnings))
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 136, in _notes_from_tiddler
    return TwNote.notes_from_soup(soup, wiki, tiddler_name, warnings)
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/twnote.py", line 147, in notes_from_soup
    notes.update(subclass.parse_html(
  File "/Users/cristi/Library/Application Support/Anki2/addons21/60456529/twnote.py", line 324, in parse_html
    id_raw = pair.find("div", class_="rid").get_text()
AttributeError: 'NoneType' object has no attribute 'get_text'

I really appreciate your work on the TiddlyRemember plugin as it is an essential part of my workflow with Anki.

Could this appear because of a problem with question/answer formatting in a Tiddler ?

If you could post some general guidelines on how to debug these type of issues (errors on sync) with the plugin it would be great.

1 Like

There is a page on that here: Exception during TiddlyRemember sync.

But I don’t think it will help with this particular problem, which isn’t common. The problem here is that somewhere you have what looks like a TiddlyRemember note, but it doesn’t have an ID field within it. I think you are probably right that it’s because of “a problem with question/answer formatting in a tiddler.”

If you’re willing to send me a copy of your wiki, I can look through it for you and find the issue – feel free to make a copy and remove anything private first (obviously, make sure that the issue still happens with the trimmed-down wiki before you send it!). You can find my email address here if you don’t want to post it publicly.

Thank you Soren. Following your suggestion I went through previous commits and found the problem.

I had the following question:

<<rememberq "20211222130502751"
	"Print next line after match with grep."
	"`grep -A1 "pattern" file`">>

which transformed to

What is the recommended way to escape " inside TiddlyRemember macros?

Would some kind of static analysis for the tiddlers containing TiddlyRemember questions/clozes that would point to issues be useful ?

TW doesn’t provide any way to escape a quotation mark within a macro parameter, but you can use a different delimiter around the macro parameter itself. I recommend triple quotes – see “Macro parameters containing quotation marks” here.

I’m not sure how that would work since TiddlyWiki doesn’t provide any tools to do it…unless I’m missing something, TiddlyRemember would have to re-implement the wikitext parser, or a subset of it, which would be a maintenance nightmare.

Noting what tiddler contains the issue when a parsing error like this occurs should be relatively straightforward, though, and would hopefully help narrow down the issue. I’ve opened an issue for that:

1 Like

Thank you, Soren. Yes, showing the name of the problematic tiddler would be very helpful.

1 Like