Stvad / CrowdAnki

Plugin for Anki SRS designed to facilitate cooperation on creation of notes and decks.
MIT License
533 stars 44 forks source link

RecursionError: maximum recursion depth exceeded / Conflict with Enhanced Cloze? #179

Closed ijgnd closed 1 year ago

ijgnd commented 1 year ago

Maybe this is the same as #172.

I tried with Anki 2.1.49 in linux and Anki 2.1.54 in Windows. On both systems I have just two add-ons installed: CrowdAnki and Enhanced Cloze (for Anki 2.1).

If the add-on "Enhanced Cloze" is disabled I get no error message.

If the add-on "Enhanced Cloze" is enabled when in the main window I click File -> "CrowdAnki: Snapshot" I get the following error message (in windows the error message is similar):

Anki 2.1.49 (dc80804a) Python 3.8.1 Qt 5.15.1 PyQt 5.15.1
Platform: Linux
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-11-13 18:47:25
Add-ons possibly involved: ⁨CrowdAnki JSON exportimport Edit history Collaborate on deck creation⁩

Caught exception:
Traceback (most recent call last):
File "/some_path/addons21/1788670778/history/archiver_vendor.py", line 38, in do_manual_snapshot
    self.do_snapshot('CrowdAnki: Manual snapshot')
File "/some_path/addons21/1788670778/history/archiver_vendor.py", line 50, in do_snapshot
    self.all_deck_archiver().archive(overrides=self.overrides(),
File "/some_path/addons21/1788670778/history/archiver.py", line 23, in archive
    self.deck_archiver_supplier(deck).archive(reason=reason)
File "/some_path/addons21/1788670778/history/anki_deck_archiver.py", line 19, in archive
    deck_path = self.deck_exporter.export_to_directory(self.deck, self.output_directory)
File "/some_path/addons21/1788670778/export/anki_exporter.py", line 45, in export_to_directory
    deck_file.write(json.dumps(deck,
File "json/__init__.py", line 234, in dumps
File "json/encoder.py", line 201, in encode
File "json/encoder.py", line 438, in _iterencode
File "/some_path/addons21/1788670778/representation/json_serializable.py", line 23, in default_json
    return object_to_serialize.flatten()
File "/some_path/addons21/1788670778/representation/deck.py", line 63, in flatten
    result = super(Deck, self).flatten()
File "/some_path/addons21/1788670778/representation/json_serializable.py", line 58, in flatten
    for key, value in self.serialization_dict().items() if
File "/some_path/addons21/1788670778/representation/deck.py", line 99, in serialization_dict
    {"media_files": list(sorted(self.get_media_file_list(include_children=False)))},
File "/some_path/addons21/1788670778/representation/deck.py", line 117, in get_media_file_list
    return media | (self._get_media_from_models() if data_from_models else set())
File "/some_path/addons21/1788670778/representation/deck.py", line 121, in _get_media_from_models
    file_provider = self.file_provider_supplier(self.collection, model_ids)
File "<string>", line 5, in __init__
File "/some_path/addons21/1788670778/anki/adapters/note_model_file_provider.py", line 20, in __post_init__
    self.models = seq(self.model_ids) \
File "/some_path/addons21/1788670778/dist/functional/pipeline.py", line 490, in map
    return self._transform(transformations.map_t(func))
File "/some_path/addons21/1788670778/dist/functional/transformations.py", line 41, in map_t
    return Transformation('map({0})'.format(name(func)),
File "/some_path/addons21/1788670778/dist/functional/transformations.py", line 32, in name
    return str(function)
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 569, in _safe_repr
File "anki/models.py", line 91, in __repr__
File "pprint.py", line 58, in pformat
File "pprint.py", line 153, in pformat
File "pprint.py", line 170, in _format
File "pprint.py", line 404, in _repr
File "pprint.py", line 417, in format
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 528, in _safe_repr
File "pprint.py", line 560, in _safe_repr
File "pprint.py", line 523, in _safe_repr
File "pprint.py", line 101, in _safe_tuple
RecursionError: maximum recursion depth exceeded while calling a Python object
aplaice commented 1 year ago

Thanks very much for the clear report!

I can indeed reproduce the issue when I install Enhanced Cloze (for Anki 2.1), but not otherwise.

I'll look into this.


From a cursory glance, it seems that something is (re)defined to be recursive in the collection models. For instance, testing the following in the Anki debug console (Ctrl-Shift-:), with just Enhanced cloze enabled, I get the same crash:

print(mw.col.models)

(The crash doesn't occur if Enhanced cloze is disabled.)

Obviously, though, given that it's us (CrowdAnki) who are trying to serialise the object, we should avoid crashing under these circumstances. :)

(AFAICT the issue is caused by Enhanced cloze's compat.add_compatibility_alias which AFAICT adds by_name, field_names and field_map as keys of the model object, rather than as methods of the model object. (It also calls the compat code when it's not actually needed, due to checking in __dict__.)) I'll see how we can work around this.


Workarounds

While I try to work out the correct approach from the side of CrowdAnki (unfortunately I probably won't have any more time to further investigate (at least I now understand what's going wrong), this week or next (sorry!) :() you can work around the issue (without disabling either add-on) by patching the Enhanced cloze compat code:

def add_compatibility_alias(namespace, new_name, old_name):
    if new_name not in list(dir(namespace)):
        setattr(namespace, new_name, getattr(namespace, old_name))
        return True

    return False
ijgnd commented 1 year ago

Thanks for this very quick fix.

I posted https://github.com/RisingOrange/anki-enhanced-cloze/issues/54 to notify RisingOrange about the problem you found in his add-on.

aplaice commented 1 year ago

I posted https://github.com/RisingOrange/anki-enhanced-cloze/issues/54 to notify RisingOrange about the problem you found in his add-on.

Thanks for posting!

ijgnd commented 1 year ago

fixed in Enhanced cloze with commit https://github.com/RisingOrange/anki-enhanced-cloze/commit/0cee285668997f70e3bdb50141f424a4e67249af