I am getting this error on my Anki. Whenever I try to shut it down I get this and I am unable to quit Anki and sometimes this jut pops up

The category for general support questions related to using AnkiHub.
Things not to ask about here:

Please include supporting information and documents such as screenshots, recordings, etc.
Anki 24.11 (87ccd24e) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-15.1-arm64-arm-64bit

Error in sys.excepthook:
Traceback (most recent call last):
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746/lib/structlog/_base.py”, line 217, in _proxy_to_logger
return getattr(self._logger, method_name)(*args, **kw)
File “logging”, line 1446, in info
File “logging”, line 1589, in _log
File “logging”, line 1599, in handle
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746/lib/sentry_sdk/integrations/logging.py”, line 96, in sentry_patched_callhandlers
return old_callhandlers(self, record)
File “logging”, line 1661, in callHandlers
File “logging”, line 952, in handle
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 10-11-09-158/settings.py”, line 769, in emit
self.flush(in_background=True)
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 10-11-09-158/settings.py”, line 775, in flush
feature_flags = config.get_feature_flags()
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 10-11-09-158/settings.py”, line 314, in get_feature_flags
return self._private_config.feature_flags
AttributeError: ‘NoneType’ object has no attribute ‘feature_flags’

Original exception was:
Traceback (most recent call last):
File “aqt.progress”, line 121, in handler
File “aqt.main”, line 221, in on_window_init
File “aqt.main”, line 320, in setupProfile
File “aqt.main”, line 558, in loadProfile
File “_aqt.hooks”, line 4101, in call
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 09-29-30-070/entry_point.py”, line 119, in _on_profile_did_open
_after_profile_setup()
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 09-29-30-070/entry_point.py”, line 174, in _after_profile_setup
handle_notes_deleted_from_webapp()
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 09-29-30-070/main/note_deletion.py”, line 31, in handle_notes_deleted_from_webapp
_mark_notes_in_anki_and_delete_from_db(ah_nids)
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 09-29-30-070/main/note_deletion.py”, line 46, in _mark_notes_in_anki_and_delete_from_db
LOGGER.info(“No notes to delete.”)
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746/lib/structlog/_native.py”, line 134, in meth
return self._proxy_to_logger(name, event, **kw)
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746/lib/structlog/_base.py”, line 217, in _proxy_to_logger
return getattr(self._logger, method_name)(*args, **kw)
File “logging”, line 1446, in info
File “logging”, line 1589, in _log
File “logging”, line 1599, in handle
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746/lib/sentry_sdk/integrations/logging.py”, line 96, in sentry_patched_callhandlers
return old_callhandlers(self, record)
File “logging”, line 1661, in callHandlers
File “logging”, line 952, in handle
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 10-11-09-158/settings.py”, line 769, in emit
self.flush(in_background=True)
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 10-11-09-158/settings.py”, line 775, in flush
feature_flags = config.get_feature_flags()
File “/Users/bhawnasahota/Library/Application Support/Anki2/addons21/1322529746 10-11-09-158/settings.py”, line 314, in get_feature_flags
return self._private_config.feature_flags
AttributeError: ‘NoneType’ object has no attribute ‘feature_flags’
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AnkiHub [‘1322529746 09-29-30-070’, 2024-11-12T23:08, ‘None’, ‘’]
AnkiHub [‘1322529746 10-11-09-158’, 2025-01-10T00:48, ‘None’, ‘’]
AnkiHub [‘1322529746 14-07-03-347’, 2024-12-03T01:30, ‘None’, ‘’]
AnkiHub [‘1322529746 18-11-51-518’, 2024-11-05T19:30, ‘None’, ‘’]
AnkiHub [‘1322529746 20-29-31-881’, 2024-10-28T21:40, ‘None’, ‘’]
AnkiHub [‘1322529746 20-57-39-464’, 2025-01-30T16:16, ‘None’, ‘’]
AnkiHub [‘1322529746’, 2025-02-26T00:34, ‘None’, mod]
Find cards from UWorld test [‘444814983’, 2024-07-19T11:49, ‘None’, ‘’]
Undelete deleted note [‘912930620’, 2022-03-04T05:10, ‘None’, ‘’]

===IDs of active AnkiWeb add-ons===
1322529746 444814983 912930620

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

Hello,

Try going to Tools in Anki at the top left → add-ons → delete the AnkiHub add-on

Then reinstall it by clicking “Get Addons” and pasting this code: 1322529746

You can also update your Anki to the latest version here: https://apps.ankiweb.net/

I did this but lost all the data I added in the Extra column of my cards.
This happened before also I backed up all yesterday and now Its gone again
All the information is very Important. Please help me

You need to protect the extra section of your cards if you don’t want it overwritten.

First you’ll need to restore to a backup: How to Restore From Backup

Then, you will need to protect your extra field so your changes don’t get overwritten/deleted by AnkiHub

See this tutorial on how to do so: Managing Protected Fields

Will I get back all my cards that were edited earlier, or just the ones that were recently updated?

Yes if you restore to a backup all the cards you edited should be there

I tried restoring a backup from about a week ago, but only a few cards have the information I added—most of them don’t. I used to find cards from UWorld, unsuspend them, and then add relevant data from the questions. However, now most of the unsuspended cards no longer have the data I added. Could you please help me understand how much I need to back up? I’m a bit confused.

Hello, :slight_smile:

Anki has an automated process of creating backups, which are done periodically throughout a given day, week, and month. The exact number varies, and can be adjusted from your settings panel if you like. But, the short version is that each backup is labeled with a timestamp that indicates the point in time at which the backup was made.

So, each backup should be something like a frozen time capsule of your collection as it existed at that point in time. If you restore to, say, Tuesday February 23rd at 11:23pm, your collection will be restored to the conditions exactly as they were on that day and at that point in time.

In this case, if you’re hoping to rewind back to a particular point to recover specific edits that will mean that you’ll want to restore back to whichever point in time those edits were still present, and before they had been overwritten.

And, therein lies the trick: when, exactly, that point in time is will depend on your local collection and its history. There’s not an easy way to determine the exact point in time this would be, and it may be that you’ll have a better sense of the history of your collection and/or it may involve working through a couple or a few backups to find the sweet spot that corresponds to the collection state you’re hoping to restore.

As Mr. Ahmed noted, if there are edits that you have made, or plan to make, it is strongly recommended that you protect the field/s that you are planning to edit. AnkiHub functions essentially by updating your fields, which necessitates writing to, and editing, various fields in your card. Unless those fields are protected, it is very likely that any alterations you might make will be overwritten with subsequent updates and/or syncs.

So, roughly in order, I would recommend:

  • Try to determine when in time your collection was in the state to which you’d like to return. Restoring from a backup that corresponds to that point in time should return your collection to that previous state.
  • Make sure to protect any fields that you have edited, or plan on editing, going forward. This tutorial can walk you through the basics (it’s the same one Mr. Ahmed linked above: Managing Protected Fields).

Give those things a shot and, of course, if you have any other questions or there’s anything I can help clarify, or any other way I, or we, can be of help please let us know and happy to do what we can to help you get squared away. :slight_smile:

Anki automatically creates backups, you need to select the one that is the most recent before your content in extra got deleted (so either yesterday or before yesterday)

The further you go out, the older it is

Correct if me I am wrong
Anki had been updating in the background and the content has been getting lost side by but I realised it later. Now when I backed it up a week ago I found some of the content reverted. So now is there any way I can get my edited data back?

If AnkiHub has been reverting it without you noticing, then you’ll have to try your recent backups to see which one has the most of your edited data.

Unfortunately, you’ll have to add some of it back but to ensure this doesn’t happen again you’ll have to protect the extra field and they won’t be overwritten anymore

You can either protect certain cards: Protect Field for Individual Note

Or you can protect a field on every card: Managing Protected Fields

I’ve protected the fields using the link you provided.
Can I sync now? My edited cards won’t be lost, right? And this protection applies to all cards, correct?

It depends a bit on which approach you took. If you protected your field for all cards, then all cards will have that field protected. If you protected that field for only an individual card, then only the field on that individual card will be protected, etc.

But yeah, so long as you have protected the field, or fields, you want then you should be good to go and free to sync without worry. Worst-case scenario you can always make a backup first just to have insurance and it’s very easy to restore to that backup if something perchance goes awry

If you run into any issues, or have any questions, feel free to reach out and we’ll do our best to get you squared away. :slight_smile:

I have protected the fields via this Managing Protected Fields link.

Sounds like you should be all set, then.

If you run into any issues, or have any other questions, feel free to follow-up and we’ll make sure you get set up with whatever you need. :slight_smile:

Thankyou so much

1 Like

I received this email yesterday
I have done everything you advised me to do
Do I need to respond to this email now or not?

Hello,

The message is from Ankiweb, rather than Ankihub. :slight_smile:

You can follow the instructions provided and reconfirm your email address at https://ankiweb.net/.

Please let me know if that answers your question, and if there’s anything else I can help with. :slight_smile: