Comments (19)
I noticed using that reviewer code as-is still causes a crash when you finish reviews, this seems to fix that as well:
from ..utils.JSCallable import JSCallable
from typing import cast, Union
from aqt import mw
@JSCallable
def getCurrentRemainingCardCount():
reviewer = mw.reviewer
if reviewer.card == None:
counts = [0, 0, 0]
else:
# Code from aqt.reviewer.Reviewer._remaining()
counts: list[Union[int, str]]
idx, counts_ = reviewer._v3.counts()
counts = cast(list[Union[int, str]], counts_)
nu, lrn, rev = counts
return nu, lrn, rev
from remaining_time.
You can replace remainingCardCount.py with this to fix (just used the aqt.reviewer.Reviewer._remaining() code from latest Anki, as per the dev's comment)
from ..utils.JSCallable import JSCallable
from typing import cast, Union
from aqt import mw
@JSCallable
def getCurrentRemainingCardCount():
reviewer = mw.reviewer
# Code from aqt.reviewer.Reviewer._remaining()
counts: list[Union[int, str]]
idx, counts_ = reviewer._v3.counts()
counts = cast(list[Union[int, str]], counts_)
nu, lrn, rev = counts
return nu, lrn, rev
from remaining_time.
https://github.com/trgkanki/remaining_time/releases/tag/v24.1.22i135
Test release. I cannot upload this to AnkiWeb (IDK why... maybe I should contact AnkiWeb admins), so I am distributing it here as an alternative.
Remove previous installation before installing this one
Im getting an Error when trying to install "dist_remaining_time.ankiaddon": Invalid extension manifest
from remaining_time.
Sorry for inconvenience:
from remaining_time.
Need a time to init VM with newest Anki installation to test with.
I won't upgrade my main Anki to 23.10 (as I'm using other addons)
from remaining_time.
I noticed using that reviewer code as-is still causes a crash when you finish reviews, this seems to fix that as well:
from ..utils.JSCallable import JSCallable from typing import cast, Union from aqt import mw @JSCallable def getCurrentRemainingCardCount(): reviewer = mw.reviewer if reviewer.card == None: counts = [0, 0, 0] else: # Code from aqt.reviewer.Reviewer._remaining() counts: list[Union[int, str]] idx, counts_ = reviewer._v3.counts() counts = cast(list[Union[int, str]], counts_) nu, lrn, rev = counts return nu, lrn, rev
from remaining_time.
Could you try:
Addon will have an error on the first Anki run. IDK how to fix it though... Addon will work on subsequent runs.
from remaining_time.
It still doesnt work? I tried adding the build.zip anki add on but it wont even let me add is as an add on. Dont know what to do now, keep getting same error.
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-13.5-arm64-arm-64bit
When loading remaining_time:
Traceback (most recent call last):
File "aqt.addons", line 245, in loadAddons
File "/Users/fatimahasan/Library/Application Support/Anki2/addons21/remaining_time/init.py", line 25, in
from .utils import uuid # duplicate UUID checked here
File "/Users/fatimahasan/Library/Application Support/Anki2/addons21/remaining_time/utils/uuid.py", line 52, in
dupUUIDCheck()
File "/Users/fatimahasan/Library/Application Support/Anki2/addons21/remaining_time/utils/uuid.py", line 45, in dupUUIDCheck
raise RuntimeError(
RuntimeError: Duplicate addon UUID 33b5ab52-7c44-4da7-92d4-4bf890a40f28 (previously registered on /Users/fatimahasan/Library/Application Support/Anki2/addons21/1508357010/utils/uuid.py
from remaining_time.
When loading remaining_time: Traceback (most recent call last): File "aqt.addons", line 245, in loadAddons File "/Users/fatimahasan/Library/Application Support/Anki2/addons21/remaining_time/init.py", line 25, in from .utils import uuid # duplicate UUID checked here File "/Users/fatimahasan/Library/Application Support/Anki2/addons21/remaining_time/utils/uuid.py", line 52, in dupUUIDCheck() File "/Users/fatimahasan/Library/Application Support/Anki2/addons21/remaining_time/utils/uuid.py", line 45, in dupUUIDCheck raise RuntimeError( RuntimeError: Duplicate addon UUID 33b5ab52-7c44-4da7-92d4-4bf890a40f28 (previously registered on /Users/fatimahasan/Library/Application Support/Anki2/addons21/1508357010/utils/uuid.py
Remove the previous version and then install the build.ankiaddon
version.
from remaining_time.
https://github.com/trgkanki/remaining_time/releases/tag/v24.1.22i135
Test release. I cannot upload this to AnkiWeb (IDK why... maybe I should contact AnkiWeb admins), so I am distributing it here as an alternative.
Remove previous installation before installing this one
from remaining_time.
It now works, thank you very much!
(there still is an initial error, but this only occures on the first execution of Anki after installation after this the error no longer occures)
from remaining_time.
Still getting an error
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.6.1 PyQt 6.6.1
Platform: Windows-10-10.0.22631
Traceback (most recent call last):
File "aqt.webview", line 50, in cmd
File "aqt.webview", line 157, in _onCmd
File "aqt.webview", line 680, in _onBridgeCmd
File "_aqt.hooks", line 5415, in call
File "C:\Users\joena\AppData\Roaming\Anki2\addons21\remaining_time\utils\JSCallable.py", line 29, in _onBridgeMessage
ret = func(*argList)
File "C:\Users\joena\AppData\Roaming\Anki2\addons21\remaining_time\jsapi\remainingCardCount.py", line 21, in getCurrentRemainingCardCount
_, counts = reviewer._v3.counts()
AttributeError: 'NoneType' object has no attribute 'counts'
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Add Hyperlink ['318752047', 2023-06-18T06:39, 'None', '']
Advanced Browser ['874215009', 2023-10-21T09:34, 'None', '']
AnKing Note Types Easy Customization ['952691989', 2024-01-19T15:17, 'None', mod]
Batch Editing ['291119185', 2023-10-25T19:38, 'None', '']
BetterSearch ['1052724801', 2023-06-15T15:44, 'None', '']
Browser Resizer ['1435775540', 2023-11-11T11:16, 'None', '']
Browser TableEditor side-by-side horizontal split ['831846358', 2022-01-25T16:11, 'None', '']
Create Filtered Deck from the Browser ['861263371', 2017-08-29T13:57, 'None', '']
Customize Keyboard Shortcuts ['24411424', 2023-11-01T04:17, 'None', '']
Image Editor ['307397307', 2022-09-07T23:09, 'None', '']
Rebuild All Empty All for Anki 21 ['1810938259', 2018-07-19T23:40, 'None', '']
Review Heatmap ['1771074083', 2022-06-29T20:43, 'None', '']
Special Fields ['1102281552', 2023-11-01T11:37, 'None', mod]
remaining_time ['remaining_time', 0, '24.1.23i147', '']
===IDs of active AnkiWeb add-ons===
1052724801 1102281552 1435775540 1771074083 1810938259 24411424 291119185 307397307 318752047 831846358 861263371 874215009 952691989
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
from remaining_time.
i am still getting start up failed with this
Sorry for inconvenience:
from remaining_time.
i am still getting start up failed with this
Sorry for inconvenience:
dist_remaining_time.zip
What error?
from remaining_time.
i am still getting start up failed with this
Sorry for inconvenience:
dist_remaining_time.zipWhat error?
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-14.2.1-arm64-arm-64bit
Traceback (most recent call last):
File "aqt.progress", line 118, in handler
File "aqt.main", line 218, in on_window_init
File "aqt.main", line 317, in setupProfile
File "aqt.main", line 496, in loadProfile
File "_aqt.hooks", line 4107, in call
File "anki.hooks", line 34, in runHook
File "/Users/jerilynsimons/Library/Application Support/Anki2/addons21/remaining_time/utils/configrw.py", line 96, in _syncJSConfig
from .uuid import addonUUID
File "", line 1007, in _find_and_load
File "", line 982, in _find_and_load_unlocked
File "", line 925, in _find_spec
File "", line 1423, in find_spec
File "", line 1389, in _get_spec
File "", line 1252, in iter
File "", line 1239, in _recalculate
File "", line 1235, in _get_parent_path
KeyError: 'remaining_time'
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Custom Background Image and Gear Icon ['1210908941', 2023-04-18T20:19, 'None', mod]
Delay Overdue Cards ['43919973', 2020-08-16T17:10, 'None', '']
Find cards from UWorld test ['444814983', 2023-10-23T04:03, 'None', '']
Image Occlusion Enhanced ['1374772155', 2022-04-09T02:15, 'None', '']
Review Heatmap ['1771074083', 2022-06-29T20:43, 'None', '']
remaining_time ['remaining_time', 0, '24.1.23i147', '']
===IDs of active AnkiWeb add-ons===
1210908941 1374772155 1771074083 43919973 444814983
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Anki Habitica for 21 ['1758045507', 2023-12-16T06:33, 'None', '']
ImageResizer ['1214357311', 2023-12-02T19:58, 'None', '']
More Decks Stats and Time Left ['1556734708', 2023-09-24T09:08, 'None', '']
Progress Bar cards done cards left secondscard time spentleft and ETA ['1097423555', 2023-10-02T03:05, 'None', '']
from remaining_time.
Don't know how to fix this, sorry
from remaining_time.
Hi! I downloaded the zip file you provided above but it's still experiencing errors. Here is the code below:
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-13.6.3-x86_64-i386-64bit
When loading remaining_time:
Traceback (most recent call last):
File "aqt.addons", line 245, in loadAddons
File "/Users/tristan/Library/Application Support/Anki2/addons21/remaining_time/init.py", line 24, in
from .utils import openChangelog
File "/Users/tristan/Library/Application Support/Anki2/addons21/remaining_time/utils/openChangelog.py", line 44, in
showChangelogOnUpdate()
File "/Users/tristan/Library/Application Support/Anki2/addons21/remaining_time/utils/openChangelog.py", line 40, in showChangelogOnUpdate
dlg = MiniBrowser(None, "CHANGELOG.html")
File "/Users/tristan/Library/Application Support/Anki2/addons21/remaining_time/utils/MiniBrowser.py", line 41, in init
self.setWindowFlags(Qt.Window)
AttributeError: type object 'Qt' has no attribute 'Window'
from remaining_time.
i encountered the same problem and downloaded the zip file. I thouht it wasn't working but now I noticed that everything works fine if I start anki while offline, open the deck and then connect to wifi. i only get the error when starting anki while connected to wifi. Once it works, i can also open a new deck and it will still work alright!
Hope this helps!
from remaining_time.
I noticed using that reviewer code as-is still causes a crash when you finish reviews, this seems to fix that as well:
from ..utils.JSCallable import JSCallable from typing import cast, Union from aqt import mw @JSCallable def getCurrentRemainingCardCount(): reviewer = mw.reviewer if reviewer.card == None: counts = [0, 0, 0] else: # Code from aqt.reviewer.Reviewer._remaining() counts: list[Union[int, str]] idx, counts_ = reviewer._v3.counts() counts = cast(list[Union[int, str]], counts_) nu, lrn, rev = counts return nu, lrn, rev
AuroraWright's solution is perfect for me by manually editing the file. Installing add-on from the zip file or github release causes error.
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.6.1 PyQt 6.6.1
Platform: Windows-10-10.0.22621
Traceback (most recent call last):
File "aqt.webview", line 50, in cmd
File "aqt.webview", line 157, in _onCmd
File "aqt.webview", line 680, in _onBridgeCmd
File "_aqt.hooks", line 5415, in call
File "C:\Users\Administrator\AppData\Roaming\Anki2\addons21\remaining_time\utils\JSCallable.py", line 29, in _onBridgeMessage
ret = func(*argList)
File "C:\Users\Administrator\AppData\Roaming\Anki2\addons21\remaining_time\jsapi\remainingCardCount.py", line 21, in getCurrentRemainingCardCount
_, counts = reviewer._v3.counts()
AttributeError: 'NoneType' object has no attribute 'counts'
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
remaining_time ['remaining_time', 0, '24.1.23i147', '']
from remaining_time.
Related Issues (20)
- Option do only show progress bar when mouse hovers over the place where it should appear HOT 1
- Install issue HOT 2
- Progress bar based on card goal HOT 1
- Add-on has been added to anki, but progress bar will still not show up HOT 2
- Maximum Review Time HOT 1
- Progress Bar Disappeared HOT 2
- Is it possible to show exact time remaining instead of ">Day"? HOT 1
- Conflict with Pokemanki HOT 2
- error when opening anki and randomly when reviewing
- working on mobile not working on tablet
- Colors not updating correctly HOT 5
- Add-on fails to load HOT 3
- [Request] Pause Button HOT 2
- Is there a way to adjust the size of the remaining time progress bar & also to change the color?
- not working in newest anki update. HOT 1
- Add-On not working on Anki Version 23.12.1 HOT 1
- Hi, Still not working :( HOT 1
- bug HOT 1
- Addon shows an error after opening Anki and does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remaining_time.