New bug when i opened anki

Before the error happened, I just lunched Anki and this error appeared

Error message (don't change this)
Anki 25.02 (038d85b1)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.26200

Traceback (most recent call last):

  File "logging.handlers", line 74, in emit

  File "logging.handlers", line 177, in doRollover

  File "logging.handlers", line 115, in rotate

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\yamno\\AppData\\Roaming\\AnkiHub\\ankihub.log' -> 'C:\\Users\\yamno\\AppData\\Roaming\\AnkiHub\\ankihub.log.1'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "aqt.taskman", line 144, in _on_closures_pending

  File "aqt.taskman", line 88, in <lambda>

  File "aqt.taskman", line 108, in wrapped_done

  File "aqt.operations", line 253, in wrapped_done

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 177, in on_failure
    on_done(future_with_exception(exception))

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\auto_sync.py", line 100, in sync_with_ankiweb
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "concurrent.futures.thread", line 58, in run

  File "aqt.operations", line 243, in wrapped_op

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\operations\ankihub_sync.py", line 166, in <lambda>
    op=lambda _: ah_deck_updater.update_decks_and_media(

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 65, in update_decks_and_media
    self._update_decks(ah_dids)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 88, in _update_decks
    should_continue = self._update_single_deck(ah_did)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 102, in _update_single_deck
    result = self._fetch_and_apply_deck_updates(ankihub_did)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\gui\deck_updater.py", line 140, in _fetch_and_apply_deck_updates
    self._client.get_note_types_dict_for_deck(ankihub_did),

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 1085, in get_note_types_dict_for_deck
    response = self._send_request("GET", API.ANKIHUB, f"/decks/{ah_did}/note-types/")

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 283, in _send_request
    return self._send_request_with_retry(

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 320, in _send_request_with_retry
    return send_with_retry()

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 314, in iter
    return fut.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\lib\tenacity\__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\ankihub_client\ankihub_client.py", line 317, in send_with_retry
    return self.thread_local_session.get().send(request, stream=stream, timeout=timeout)

  File "requests.sessions", line 710, in send

  File "requests.hooks", line 30, in dispatch_hook

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\addon_ankihub_client.py", line 52, in logging_hook
    LOGGER.debug("Response content", content=json.loads(response.text))

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\lib\structlog\_native.py", line 134, in meth
    return self._proxy_to_logger(name, event, **kw)

  File "C:\Users\yamno\AppData\Roaming\Anki2\addons21\1322529746\lib\structlog\_base.py", line 217, in _proxy_to_logger
    return getattr(self._logger, method_name)(*args, **kw)

  File "logging", line 1434, in debug

  File "logging", line 1589, in _log

  File "logging", line 1599, in handle

  File "C:\Users\yamno\AppData\Roaming\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 "logging.handlers", line 77, in emit

  File "logging", line 1004, in handleError

  File "colorama.ansitowin32", line 47, in write

  File "colorama.ansitowin32", line 177, in write

  File "colorama.ansitowin32", line 205, in write_and_convert

  File "colorama.ansitowin32", line 210, in write_plain_text

  File "colorama.ansitowin32", line 47, in write

  File "colorama.ansitowin32", line 177, in write

  File "colorama.ansitowin32", line 205, in write_and_convert

  File "colorama.ansitowin32", line 211, in write_plain_text

AttributeError: 'ErrorHandler' object has no attribute 'flush'

Sentry link (for developers)

Hello,

Please ensure you are on the latest version of Anki. You can download it here: https://apps.ankiweb.net/. After downloading, simply run the downloaded file to update your application.

Also update your AnkiHub add-on:

  1. On your Anki main screen, go to Tools > Add-ons > Check for Updates.
  2. After the update is complete, please restart Anki.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.