sobjornstad / TiddlyRemember

Embed Anki notes in your TiddlyWiki
https://sobjornstad.github.io/TiddlyRemember/
MIT License
65 stars 7 forks source link

Issues with Tiddlywiki 5.2 upgrade #52

Closed h6y3 closed 3 years ago

h6y3 commented 3 years ago

I foolishly updated to the latest Tiddlywiki 5.2 and discovered that upon upgrade it appears that things have broken on Tiddlyremember. I'm using Nodejs on the server side and version 2.1.44 on the client-side (M1 Mac). I had no problems until I upgraded, but as far as I can tell nothing else but Tiddlyremember broke; which is terrible since this is the plugin I use daily.

Here's the error I get on the client-side:

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.44 (b2b3275f) 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-10-26 12:10:20
Add-ons possibly involved: ⁨TiddlyRemember⁩

Caught exception:
Traceback (most recent call last):
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 61, in _invoke_tw_command
    proc = subprocess.run(cmd, cwd=wiki_path, stdout=subprocess.PIPE,
  File "subprocess.py", line 512, in run
subprocess.CalledProcessError: Command '['/usr/local/bin/tiddlyremember', '--load', '/var/folders/36/rgts6_wd0559_p1z444ngh600000gn/T/tmp_lkbeydl/wiki.html', '--savewikifolder', '/var/folders/36/rgts6_wd0559_p1z444ngh600000gn/T/tmp_lkbeydl/wikifolder']' returned non-zero exit status 1.

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

Traceback (most recent call last):
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/__init__.py", line 187, in join_thread
    if self.handle_thread_exception():
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/__init__.py", line 175, in handle_thread_exception
    raise exc
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/__init__.py", line 62, in run
    self.notes = twimport.find_notes(
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 195, in find_notes
    _folderify_wiki(tw_binary, downloaded_file, wiki_folder)
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 52, in _folderify_wiki
    _invoke_tw_command(cmd, None, "folderify wiki")
  File "/Users/hyuan/Library/Application Support/Anki2/addons21/60456529/twimport.py", line 72, in _invoke_tw_command
    raise RenderingError(
60456529.oops.RenderingError: Failed to folderify wiki: return code 1.
$ /usr/local/bin/tiddlyremember --load /var/folders/36/rgts6_wd0559_p1z444ngh600000gn/T/tmp_lkbeydl/wiki.html --savewikifolder /var/folders/36/rgts6_wd0559_p1z444ngh600000gn/T/tmp_lkbeydl/wikifolder

Error: No tiddlers found in file "/var/folders/36/rgts6_wd0559_p1z444ngh600000gn/T/tmp_lkbeydl/wiki.html"
sobjornstad commented 3 years ago

The latest version of TiddlyRemember is compatible with TiddlyWiki 5.2.0 as far as I am aware. I have upgraded my wiki and it still works for me, and 5.2 has been out for a few weeks and I have not heard of any other upgrade-related issues. Have you checked to be sure you have the latest version of the add-on (1.2.3) both in your wiki and in Anki?

The error message indicates that the wiki that's being imported doesn't contain any tiddlers. Are you sure the path to your wiki and other settings in the add-on configuration within Anki are still correct?

h6y3 commented 3 years ago

@sobjornstad Thank you (and also thank you for Tiddlyremember). It turns out, I had a very specific issue. I run a completely separate server from my Mac but apparently, I also need to upgrade Tiddlywiki on my Mac to get all the parts working correctly. Along the way, I also upgraded the Anki client itself.

At this point, it appears everything is stable so this is my fault!

sobjornstad commented 3 years ago

Glad to hear you got it working!

On October 26, 2021 at 02:04pm, Han Yuan wrote: @.*** Thank you (and also thank you for Tiddlyremember). It turns out, I had a very specific issue. I run a completely separate server from my Mac but apparently, I also need to upgrade Tiddlywiki on my Mac to get all the parts working correctly. Along the way, I also upgraded the Anki client itself.

At this point, it appears everything is stable so this is my fault!

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/sobjornstad/TiddlyRemember/issues/52#issuecomment-952324092

h6y3 commented 3 years ago

I was reading through the release notes for 5.2, and I think the reason I never had to do this before was due to the changes in 5.2, specifically this one:

Unrestricted Fieldnames and the New JSON Store Area The major change in this release is that the format used to store tiddlers in TiddlyWiki's HTML file has changed from an HTML DIV-based format to a new JSON-based format.

As discussed here. If someone happens to be using Tiddlyremember the way I am (hosted not on localhost), they may run into the same problem.

Glad to hear you got it working! On October 26, 2021 at 02:04pm, Han Yuan wrote: @.*** Thank you (and also thank you for Tiddlyremember). It turns out, I had a very specific issue. I run a completely separate server from my Mac but apparently, I also need to upgrade Tiddlywiki on my Mac to get all the parts working correctly. Along the way, I also upgraded the Anki client itself. At this point, it appears everything is stable so this is my fault! -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: #52 (comment)

crazko commented 2 years ago

Just to add info for those with the same error - when updating the TiddlyWiki version, do not forget to update also the one installed on Node.js as specified in Step 2 of installation steps.


Unfortunately, I'm now stucked with #40, and have not yet been able to find a solution.

sobjornstad commented 2 years ago

@crazko: Have you tried rebooting yet? If this is a file locking issue as I suspect, that may resolve it – surprised I forgot to suggest that in #40.