Closed Etyre closed 2 years ago
@Etyre Could you export the page as json and send it to me? Or create a new page with a couple blocks on it which produce the error and export that
Sure. I can't attach a JSON file to a issue-message in GitHub, so I just emailed you.
Let me know if you figure anything out!
An update: I think that all of these blocks include a cloze deletion and most (but not all of them) include a greek letter, either θ, α, or π.
Update on this: I as near as I can tell, cloze deletions blocks, in general, have stopped importing for me.
Looking at my decks and which blocks cause the errors, I don't think that any of my cloze deletion cards have been imported almost a year. (The last ones that I can definitely pinpoint are from July 2021).
Do you have any idea what's up with that? Or a suggestion about what I should do to troubleshoot here?
Very strange! I haven't had any issues with cloze deletions on my end. I remember trying to replicate this shortly after you'd reported the issue and wasn't able to. I'll try again later this week with the export you provided already on the latest version and see if I have any luck
Any updates on this?
I have a growing pile of cloze deletion cards that fail to import every time I run ankify_roam, and I don't have any guesses about what might be going wrong.
I think I found the problem. I was able to replicate using the "Calculus for the Forgetful.json" you'd sent me previously and fix on my end. Looks like the "Roam Cloze" note type created using ankify_roam init-models
had an issue.
If you can confirm the fix works before I deploy to master, that'd be great. If I don't hear back in a few days I'll go ahead deploy. Here are the steps to check the fix:
pip uninstall ankify_roam
pip install git+https://github.com/taylormitchell/ankify_roam.git@fix-cloze-import
ankify_roam init-models
ankify_roam add ~/Downloads/Calculus\ for\ the\ Forgetful.json
Let me know if it works!
Sorry for the delay. I must have missed this my email. (I'll keep an eye out going forward).
When I go look at "Roam Cloze" in "Note Types", it looks like there are 155 notes of that category. (Which makes sense to me. I made a lot of cloze cards before that stopped working.)
I'm hesitant to delete the note type for fear of deleting those cards.
I could still follow these other steps though, if that seems likely to help.
Follow up on this?
Hey sorry, this fell off my radar.
Here's a modified version of the steps above which will keep the existing cloze notes you have:
pip uninstall ankify_roam
pip install git+https://github.com/taylormitchell/ankify_roam.git@fix-cloze-import
ankify_roam init-models
ankify_roam add ~/Downloads/Calculus\ for\ the\ Forgetful.json
If this doesn't work, or you're still worried about breaking something, let me know and let's hop on a call to do it together.
I'm wanting to try this on a different computer than my main one, so that if I mess it up I don't delete a bunch of my cards. Waiting until I have access to another machine.
I finally got my hands on a backup computer, and some time away from work.
Unfortunately, when I run ankify_roam init-models
, I get the following error message.
(base) atlasfellowship@Claires-MBP-4 ~ % ankify_roam init-models
Traceback (most recent call last):
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/http/client.py", line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/http/client.py", line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/http/client.py", line 1040, in _send_output
self.send(msg)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/http/client.py", line 980, in send
self.connect()
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/http/client.py", line 946, in connect
self.sock = self._create_connection(
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/socket.py", line 844, in create_connection
raise err
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/socket.py", line 832, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/atlasfellowship/opt/anaconda3/bin/ankify_roam", line 8, in <module>
sys.exit(main())
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/site-packages/ankify_roam/cli.py", line 141, in main
func(**args)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/site-packages/ankify_roam/cli.py", line 28, in init_models
models = add_default_models(overwrite=overwrite)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/site-packages/ankify_roam/default_models.py", line 274, in add_default_models
modelNames = anki.get_model_names()
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/site-packages/ankify_roam/anki.py", line 122, in get_model_names
return _invoke("modelNames")
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/site-packages/ankify_roam/anki.py", line 24, in _invoke
response = json.load(urllib.request.urlopen(request))
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 1375, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/Users/atlasfellowship/opt/anaconda3/lib/python3.9/urllib/request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 61] Connection refused>
(base) atlasfellowship@Claires-MBP-4 ~ %
Ah. That was because I needed to install Anki connect, though.
Ok. As near as I can tell, that worked. All 79 close cards that have been piling up, failing to import are now in my deck.
Woo!
Thank you so much for your help. I'm looking forward to going back to relying heavily on cloze cards.
The updated version of Ankify_roam did cause a new problem, of a sort, but that's unrelated, so I'll make a new thread for it.
Awesome and no problem! Sorry it took so long, but I'm glad it's finally working for you :D
When I run ankify roam, I'm getting the error message bellow.
From going through and looking at the individual blocks...
Any thoughts / suggestions?