Code Monkey home page Code Monkey logo

anki-addons's People

Contributors

mbdevpl avatar sebastiengllmt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

anki-addons's Issues

[Historical Throughput] Fallback when get_start_end_chunk is missing

For Anki 2.1 I replaced the old code to use get_start_end_chunk instead. It turns out this doesn't work well since this function was only. added in Anki 2.1.12

Either I can add a fallback when this method is not implemented or I can just. undo the. use of get_start_end_chunk entirely.

Anki 2.1.11 (3cf770c7) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
  File "aqt\webview.py", line 27, in cmd
  File "aqt\webview.py", line 85, in _onCmd
  File "aqt\webview.py", line 360, in _onBridgeCmd
  File "aqt\toolbar.py", line 56, in _linkHandler
  File "aqt\toolbar.py", line 77, in _statsLinkHandler
  File "aqt\main.py", line 856, in onStats
  File "aqt\__init__.py", line 82, in open
  File "<decorator-gen-52>", line 2, in __init__
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 65, in repl
  File "aqt\stats.py", line 43, in __init__
  File "aqt\stats.py", line 85, in refresh
  File "anki\stats.py", line 124, in report
  File "<decorator-gen-64>", line 2, in cardGraph
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 71, in repl
  File "C:\Users\draykid\AppData\Roaming\Anki2\addons21\485345973\main.py", line 31, in new_progressGraphs
    start_not_used, num_buckets, bucket_size_days = self.get_start_end_chunk()
<class 'AttributeError'>: 'CollectionStats' object has no attribute 'get_start_end_chunk'

True Retention Graph add-on

Would you be interested to make a similar add-on; it would show a retention-% for the Graduating Interval ?
There are a few add-ons for Review cards, but nothing is available for the Learning cards. Why the Graduating ivl? Because we will make analyses of the ENTIRE learning process Outside Anki ( and the Learning Steps) and make changes.
The code will have to track the card Type '1' only - to reduce the 'noise'.

I kept this short; more details is available.

PS. Anki Retention graph for the Learning cards is not designed for the 'cards' - it is made to count the 'reps'. I found the ways but my workaround can not be recommended for the users.

Error when switching screens

This error occurs without fail on every screen change even when it is the only add on downloaded.

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.23 (de9543ff) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.15.1
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-04-20 10:22:21
Add-ons possibly involved: Throughput Monitor

Caught exception:
Traceback (most recent call last):
File "aqt/main.py", line 928, in onStudyKey
File "aqt/main.py", line 591, in moveToState
File "aqt/gui_hooks.py", line 1538, in call
File "anki/hooks.py", line 611, in runHook
File "/Users/rachelstandifird/Library/Application Support/Anki2/addons21/826650564/main.py", line 426, in renderProgressBars
throughput_tracker = GetStateForCol(repaintFormat=True)
File "/Users/rachelstandifird/Library/Application Support/Anki2/addons21/826650564/main.py", line 355, in GetStateForCol
throughput_tracker.setStudyTimeLeftFormat(throughput[0])
File "/Users/rachelstandifird/Library/Application Support/Anki2/addons21/826650564/main.py", line 181, in setStudyTimeLeftFormat
bar_holder.studyTimeLeftBar.progressBar.setMaximum(((seconds_left + self.studyTimeStopwatch.get_time())*granularity) + self.dailyStudyTime)
OverflowError: argument 1 overflowed: value must be in the range -2147483648 to 2147483647

[Throughput Monitor] <class 'RuntimeError'>: wrapped C/C++ object of type QLabel has been deleted

I've just tried your add-ons and really like them.
After flame mode, I encountered this error:

Error 
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. 
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. 
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. 
Debug info:
Anki 2.1.15 (6661ba8a) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
  File "aqt\webview.py", line 27, in cmd
  File "aqt\webview.py", line 87, in _onCmd
  File "aqt\webview.py", line 368, in _onBridgeCmd
  File "<decorator-gen-254>", line 2, in review_link_handler_wrapper
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 71, in repl
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\880824023\slackersDelight.py", line 137, in linkHandler
    else: _old(self, url)
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\498789867\__init__.py", line 91, in review_link_handler_wrapper
    original_review_link_handler(reviewer, url)
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\385888438\__init__.py", line 125, in myLinkHandler
    origLinkHandler(reviewer, url)
  File "<decorator-gen-8>", line 2, in myLinkHandler
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 71, in repl
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\1046608507\main.py", line 193, in linkHandler
    return _old(self, url)
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\1020366288\__init__.py", line 84, in myLinkHandler
    origLinkHandler(reviewer, url)
  File "aqt\reviewer.py", line 289, in _linkHandler
  File "<decorator-gen-306>", line 2, in newAnswerCard
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 65, in repl
  File "<decorator-gen-280>", line 2, in newAnswerCard
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 71, in repl
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\935264945\main.py", line 214, in answerCard
    _old(self, ease)
  File "<decorator-gen-276>", line 2, in newAnswerCard
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 69, in repl
  File "<decorator-gen-228>", line 2, in newAnswerCard
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 69, in repl
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\653807651\__init__.py", line 56, in newAnswerCard
    _oldAnswerCard(self, ease)
  File "<decorator-gen-18>", line 2, in _answerCard
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 69, in repl
  File "aqt\reviewer.py", line 237, in _answerCard
  File "<decorator-gen-242>", line 2, in answerCard
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 68, in repl
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\826650564\main.py", line 459, in updateThroughputOnAnswer
    throughput_tracker.adjustPointCount(card, increment=True)
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\826650564\main.py", line 265, in adjustPointCount
    self.setPointFormat(self.batchPointCount, pointbar_max)
  File "C:\Users\user\AppData\Roaming\Anki2\addons21\826650564\main.py", line 242, in setPointFormat
    _flameLabel.deleteLater()
<class 'RuntimeError'>: wrapped C/C++ object of type QLabel has been deleted

Throughput Monitor bar confusion

Would you mind expanding on the third bar?
The first is the 5 minute timer.
The second is the estimated time remaining.
What does the third do? For me it shows 0/Random number and stays fixed.

[Throughput Monitor] Undo failing

Some user reported the undo feature doesn't work for them after installing the addon. I suspect this will fix it:

replace

On line 475 you should see the following code

def updateThroughputOnUndo(x, _old):
    cardid = _old(x)
    if cardid:
        card = mw.col.getCard(cardid)
        throughput_tracker = GetStateForCol()
        if throughput_tracker == None:
            return

        throughput_tracker.cardsLeftSnapshot = _getNumCardsLeft()

        throughput_tracker.adjustPointCount(card, increment=False)
_Collection.undo = wrap(_Collection.undo, updateThroughputOnUndo, "around")

with

def updateThroughputOnUndo(x, _old):
    cardid = _old(x)
    if cardid:
        card = mw.col.getCard(cardid)
        throughput_tracker = GetStateForCol()
        if throughput_tracker == None:
            return cardid

        throughput_tracker.cardsLeftSnapshot = _getNumCardsLeft()

        throughput_tracker.adjustPointCount(card, increment=False)
    return cardid
_Collection.undo = wrap(_Collection.undo, updateThroughputOnUndo, "around")

Error with Anki 2.1.15

I've cloned your repo, zipped the TrueRetentionGraph folder, loaded it into my Anki and it gave me this error:

Error 
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. 
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. 
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. 
Debug info:
Anki 2.1.15 (442df9d6) Python 3.8.2 Qt 5.14.2 PyQt 5.14.2
Platform: Linux
Flags: frz=False ao=True sv=1
Add-ons possibly involved: Throughput Monitor

Caught exception:
  File "/usr/share/anki/aqt/webview.py", line 27, in cmd
    return json.dumps(self.onCmd(str))
  File "/usr/share/anki/aqt/webview.py", line 87, in _onCmd
    return self._onBridgeCmd(str)
  File "/usr/share/anki/aqt/webview.py", line 368, in _onBridgeCmd
    return self.onBridgeCmd(cmd)
  File "/usr/share/anki/aqt/toolbar.py", line 56, in _linkHandler
    self.link_handlers[link]()
  File "/usr/share/anki/aqt/toolbar.py", line 77, in _statsLinkHandler
    self.mw.onStats()
  File "/usr/share/anki/aqt/main.py", line 878, in onStats
    aqt.dialogs.open("DeckStats", self)
  File "/usr/share/anki/aqt/__init__.py", line 82, in open
    instance = creator(*args)
  File "/usr/share/anki/aqt/stats.py", line 43, in __init__
    self.refresh()
  File "/usr/share/anki/aqt/stats.py", line 85, in refresh
    self.report = stats.report(type=self.period)
  File "/usr/share/anki/anki/stats.py", line 124, in report
    txt += self._section(self.cardGraph())
  File "<decorator-gen-2>", line 2, in cardGraph
  File "/usr/share/anki/anki/hooks.py", line 74, in decorator_wrapper
    return repl(*args, **kwargs)
  File "/usr/share/anki/anki/hooks.py", line 71, in repl
    return new(_old=old, *args, **kwargs)
  File "/home/fytch/.local/share/Anki2/addons21/ThroughputMonitor/main.py", line 188, in new_progressGraphs
    result += _plot(self,
  File "/home/fytch/.local/share/Anki2/addons21/ThroughputMonitor/main.py", line 74, in _plot
    txt += _graph(
<class 'TypeError'>: _graph() got an unexpected keyword argument 'timeTicks'

[Throughput Monitor] Single Bar

I notice on my tablet that the three bars are combined to one to save space.
Is there any way of using that mode on larger screens?

[Throughput Monitor] Bars fail to stack

A few users have reported. that bars don't stack properly for them (even with other addons disabled). I can't repro this so I don't know what the. root. cause is.

Example

image

Can't work well with a Anki-addon——ReMemorize

I often use a Anki-addon——ReMemorize: Rescheduler with sibling and logging.However Throughput Monitor can't work well with it. Throughput Monitor can't count cards which are rescheduled by ReMemorize.

Type error

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.50 (81cc5a09) Python 3.10.2 Qt 5.15.2 PyQt 5.15.6
Platform: Linux
Flags: frz=False ao=True sv=2
Add-ons, last update check: 2022-02-06 03:44:20
Add-ons possibly involved: ⁨Throughput Monitor⁩

Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/aqt/main.py", line 560, in loadCollection
self.moveToState("deckBrowser")
File "/usr/lib/python3.10/site-packages/aqt/main.py", line 713, in moveToState
gui_hooks.state_did_change(state, oldState)
File "/usr/lib/python3.10/site-packages/aqt/hooks_gen.py", line 3594, in call
anki.hooks.runHook("afterStateChange", new_state, old_state)
File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 34, in runHook
func(*args)
File "/home/grim/.local/share/Anki2/addons21/826650564/main.py", line 491, in pauseTimerOnReviewExit
throughput_tracker = GetStateForCol()
File "/home/grim/.local/share/Anki2/addons21/826650564/main.py", line 334, in GetStateForCol
bar_holder = ProgressBarHolder()
File "/home/grim/.local/share/Anki2/addons21/826650564/main.py", line 107, in init
self.pointBar = ProgressBar(
File "/home/grim/.local/share/Anki2/addons21/826650564/ThroughputMonitor/bar.py", line 46, in init
self.progressBar.setRange(rangeMin, rangeMax)
TypeError: setRange(self, int, int): argument 2 has unexpected type 'float'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.