Anki Forums

Countdown to Events / Exams addon [Official Thread]

If you have a problem with the add-on ‘Countdown to events / exams’ (https://ankiweb.net/shared/info/1143540799)

Then post in this thread. This way i get a notification. Alternatively you can email me: anki.sam@outlook.com

1 Like

I am getting this on multiple of my computers with this add on (but I don’t get it on one computer). It only happens when I go to close Anki or switch profiles.

Debug info:
Anki 2.1.29 (bbff62bf) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=?
Add-ons, last update check: 2020-08-01 04:02:49

[2020-08-01 06:55:02,947] ERROR in app: Exception on /_addons/1143540799/styles.css [GET]
Traceback (most recent call last):
  File "lib\site-packages\flask\app.py", line 2447, in wsgi_app
  File "lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
  File "lib\site-packages\flask_cors\extension.py", line 161, in wrapped_function
  File "lib\site-packages\flask\app.py", line 1821, in handle_user_exception
  File "lib\site-packages\flask\_compat.py", line 39, in reraise
  File "lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
  File "lib\site-packages\flask\app.py", line 1936, in dispatch_request
  File "aqt\mediasrv.py", line 93, in allroutes
  File "aqt\mediasrv.py", line 199, in _redirectWebExports
AttributeError: 'NoneType' object has no attribute 'media'
[2020-08-01 06:55:03,018] ERROR in app: Exception on /_addons/1143540799/styles.css [GET]
Traceback (most recent call last):
  File "lib\site-packages\flask\app.py", line 2447, in wsgi_app
  File "lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
  File "lib\site-packages\flask_cors\extension.py", line 161, in wrapped_function
  File "lib\site-packages\flask\app.py", line 1821, in handle_user_exception
  File "lib\site-packages\flask\_compat.py", line 39, in reraise
  File "lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
  File "lib\site-packages\flask\app.py", line 1936, in dispatch_request
  File "aqt\mediasrv.py", line 93, in allroutes
  File "aqt\mediasrv.py", line 199, in _redirectWebExports
AttributeError: 'NoneType' object has no attribute 'media'

Likely because of the anki version you’re using, I’ll test it myself on 2.1.29 and see if i can get it to work

After looking at the code:

File: anki/qt/aqt/mediasrv.py
167: def _redirectWebExports(path):
...
199:     return aqt.mw.col.media.dir(), path

This happened because the col object was closed (None). @dae do we need to handle this?

I’ll push a fix later today