Announcing Beeminder for Anki


#12

It’s probably not really interesting to do, but I imagine some sort of site or location where those starting to use the plugin can go for some standard scenarios… Some of the features are clear from the perspective of the plugin, but then I don’t know what data it will publish to BM etc.


#13

Beeminder for anki is not workinf for me. :frowning: :sob:
I didn’t know if I should post it here, sorry if I’m wrong, but I thought that could help @ianminds develop the plugin.

Traceback (most recent call last): File "D:\Users\#####\Documents\Anki\addons\beetime\__init__.py", line 25, in <lambda> mw.connect(manualSync, SIGNAL("triggered()"), lambda: syncDispatch(at='manual')) File "D:\Users\#####\Documents\Anki\addons\beetime\sync.py", line 59, in syncDispatch prepareApiCall(col, reportTimestamp, numberOfCards, comment, goal_type='reviewed') File "D:\Users\#####\Documents\Anki\addons\beetime\sync.py", line 86, in prepareApiCall newDatapointId = sendApi(user, token, slug, data, cachedDatapointId) File "D:\Users\#####\Documents\Anki\addons\beetime\api.py", line 14, in sendApi response = apiCall("POST", user, token, slug, data, did) File "D:\Users\#####\Documents\Anki\addons\beetime\api.py", line 37, in apiCall params = urllib.urlencode(data) File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/urllib", line 1312, in urlencode UnicodeEncodeError: 'ascii' codec can't encode character u'\xf5' in position 14: ordinal not in range(128)


#14

Good idea! I’ve been thinking about this as well! Just this weekend I added some help text, where I started collecting things that I think would be useful to first time users.

Also I updated the beta, which is now the preferred version to use. Please help me test it by trying it out! As always, please do backup your data first. It will probably delete your current settings (as it is designed to). If you start it from a terminal, it will echo them so you could easily copy paste e.g. your API key back.

I/we definitely need to collect some usage scenario’s as well.

You can definitely help with:

  1. A wiki-post on here where we share our current Anki goals, with a copy of the graph and an explanation of the settings and the goal’s objectives. I’ll start this one.
  2. Letting me know things that are currently unclear or that you think could go in the help.

Later I’ll ask for some input on how you’d like to Beemind things that are currently not possible. But I’d like to show my ideas for the next version first, so the suggestions are directly related to what I’d be planning to implement.


#15

Syncing review time

Edit this post and describe your goal here!

Do less

A Do less goal might be reasonable if you want to curb a habit of over-studying, or in combination with a Do more goal, to keep within a range of daily reviews.

ianminds’ Do more goal

Use case: I track my review time to make sure I do a steady and consistent amount of reviewing.
Rescuetime tracking did not work for me since it is too easy to get credit for time spent in Anki’s interface (e.g. creating decks) and not actually reviewing. With Rescuetime it was also impossible to study past midnight, while the add-on respects Anki’s end-of-day setting (not Beeminder’s).
TagTime, while the goto option for all my time-tracking needs, is literally impossible if you want to have occasional eep days and a shallow slope of e.g. only 5 minutes/day.

Syncing number of reviews

Edit this post and describe your goal here!

Syncing number of additions

Edit this post and describe your goal here!

Syncing number of cards due

Whittle down a backlog

Use case: I found myself with a backlog due to not using Anki for a while. Using a Whittle down goal with a negative slope (set to -5/day), I am forced to do both my daily reviews and a small part of my backlog. A useful setting is “Sync at startup”, which immediately puts you on the hook when, after starting Anki, your reviews due are higher than the YBR. Your only course of action then is to do enough reviews before the deadline.

What this goal doesn’t do is force you to do a daily/steady amount of reviewing. A review time/number of reviews goal might be better for that.


30 281 "still 281 cards due at 21:56:17" 31 314 "still 314 cards due at 23:46:50" 31 278 "still 278 cards due at 23:56:24" 31 274 "still 274 cards due at 00:25:20"


#16

Too cute! :bee: I can’t think of anything I’d still like to add to this release, so I’ll be monitoring for bug reports.


#17

I just thought I’d share this part of an email from Khatzumoto (of AJATT fame):


Just food for thought, esp on this post :slight_smile:
I think sometimes I get too caught up in the numbers, to the exclusion of what my goals in learning language or set of facts x or y is. This was a timely reminder.


mattepp's Beeminder/Anki experiment journal
#18

– Not so cute for me :frowning:

But I’ve got the number of new cards added set up and it’s working a treat! I would quite like the option to only report data to Beeminder if I have added new cards (so no zero datapoints). I have a set up that reads when data was last submitted so it can infer when I last added cards. It’s not so informative when there’s a zero submitted every day.


#19

Thanks for the update! And the bee has emerged on Windows :smiley:


#20

Oh no! I switched to the new version and now I have an error!

Traceback (most recent call last):
  File "/Users/lawrence/Documents/Anki/addons/beetime/settings.py", line 172, in onApply
    self.bc.store()
  File "/Users/lawrence/Documents/Anki/addons/beetime/config.py", line 17, in store
    self.save()
  File "/Users/lawrence/Documents/Anki/addons/beetime/config.py", line 20, in save
    self.col.setMod()
  File "anki/collection.pyc", line 110, in setMod
AttributeError: 'NoneType' object has no attribute 'mod'

I’m afraid I can’t parse this to figure out what’s wrong. What should I do? :frowning:


#22

Hmm, I can’t seem to reproduce it (when simulating upgrading to the latest version). So I’m not sure if this is a rare bug due to the upgrade path you took or something affecting all users.

I did make a small change to the new version in an attempt to fix this. If you have a backup from right before you upgraded, you could check if the bug still occurs with this version!

You could also try to “reset” the add-on from the settings menu and re-install it.


#23

Thank you for trying to fix it! I used Anki’s menus to delete the add-on and reinstall it. Unfortunately, for both the previous version and the new beta, I now don’t have the “Setup Beeminder Sync” option. The original version gives me no error message, but also no setup settings; the beta gives an all new error message:

Traceback (most recent call last):
  File "aqt/progress.pyc", line 69, in handler
  File "aqt/main.pyc", line 110, in setupProfile
  File "aqt/main.pyc", line 234, in loadProfile
  File "anki/hooks.pyc", line 56, in repl
  File "/Users/lawrence/Documents/Anki/addons/beetime/__init__.py", line 47, in ankiwebSync
    syncDispatch(at='ankiweb')
  File "/Users/lawrence/Documents/Anki/addons/beetime/sync.py", line 66, in syncDispatch
    prepareApiCall(col, reportTimestamp, numberOfCards, timestampComment(comment, now, bc.get('reviewed', 'overwrite')), goal_type='reviewed')
  File "/Users/lawrence/Documents/Anki/addons/beetime/sync.py", line 109, in prepareApiCall
    incomingID = sendApi(user, token, slug, data, outgoingId)
  File "/Users/lawrence/Documents/Anki/addons/beetime/api.py", line 14, in sendApi
    response = apiCall("POST", user, token, slug, data, did)
  File "/Users/lawrence/Documents/Anki/addons/beetime/api.py", line 43, in apiCall
    raise Exception("transmission failed:", response.status, response.reason, response.read())
Exception: ('transmission failed:', 404, 'Not Found', '')

I took some screencaps in case something is odd about my setup:



I was using the previous deprecated odometer-style plugin until I switched to this one quite recently, but I am pretty sure it’s been comprehensively removed… I re-installed Anki itself and it’s up to date…

Oh! Sometimes it causes problems that I am not the admin on my laptop (I use parental controls on myself to make myself go to bed). Is there some place where it needs admin authentication but isn’t giving me the pop-up to provide it?

I’d really love to find a way to make this work (I can tip you for your programming time??) since I was getting a lot of mileage out of those Anki goals, which will lose their usefulness if I have to update them all manually. And right now things are borked enough that I apparently can’t even use the older version :frowning:

Any ideas about what to do?


#24

Thanks for your detective work! There’s a couple of issues here.

First is correctly and completely deleting the add-on. Anki makes this unnecessary difficult; using Anki’s menus like you did is not enough. Here’s a gem from Anki’s source code:

in the future, it would be nice to save the addon id and unzipped file list to the config so that we can clear up all files and check for updates

I’ll work on a procedure to remove all traces of the add-on. I have to resist the urge to do this quickly to avoid creating more problems, but it should be done later today.

Secondly, the new error might be caused by a bad connection or a problem with the add-on’s cache. One quick thing you can try is to temporarily set the add-on to upload multiple datapoints (and do a review or add a card before syncing). If that worked you can restore the setting again.


#25

Updated to a version with slightly more informative error messaging and a (horrible) reset mechanism should you need it. I also removed the datapoint caching code in favour of using the awesome requestid API parameter. This might fix your 404 error as well.

Hopefully this one Just Works. However, should you still need to completely remove the add-on and go back to the previous version, the following steps should now work:

  1. Press Control+: (colon) in Anki
  2. Copy and paste the following code in the top-most pane:from beetime import * debug(reset=True)
  3. Press Control+Enter (to execute)
  4. Optionally send the output (in the lower pane) to me in a PM
  5. Then quit Anki and manually delete Beeminder_Sync.py and .pyc and the beetime/ folder in Anki’s addons folder

Also, the add-on shouldn’t need any admin privileges. And thanks for offering to tip! One of my goals was to make a small piece of software that people could love. But I had also been planning to offer some way to tip, just not yet!


#26

I only just now had the chance to try this – and it works!! Thank you so much! :slight_smile:

One hiccup that I had was a slightly unhelpful error message when I first restarted Anki – it gave me the 404 and suggested checking my connection settings, but the problem was really that I needed to input my username and auth key into the “Setup Beeminder sync” panel – but when I checked the “Setup” panel it was obvious that that information was necessary so I fixed it quickly and easily. And now it works!!

Thank you again for rescuing these goals for me! :smiley:


#27

I’ve been getting an error:

Something went wrong posting to oldmannick/anki.
Please check your connection and settings!
(422, 'Unprocessable Entity', '{"errors":"Duplicate request"}')

I have all boxes checked except ‘report zero value datapoints’ in the settings, and it syncs review time.

My Beeminder data points look like this, which isn’t the desired behavior (I want it to post the minutes I studied that day, not the total ever studied)

03 145.216666667 "studied 1316 cards in 145 minutes at 00:54:22"
05 156.083333333 "studied 1386 cards in 156 minutes at 01:29:06"
06 156.083333333 "studied 1386 cards in 156 minutes at 01:49:15"

#28

Below is the error code I’m getting with Beeminder Beta add-on for Anki.
An error occurred in an add-on.
Please post on the add-on forum:
https://anki.tenderapp.com/discussions/add-ons

Traceback (most recent call last):
File “C:\Users\Chris\Documents\Anki\addons\beetime\settings.py”, line 137, in onAccept
self.onApply()
File “C:\Users\Chris\Documents\Anki\addons\beetime\settings.py”, line 170, in onApply
self.bc.store()
File “C:\Users\Chris\Documents\Anki\addons\beetime\config.py”, line 18, in store
self.save()
File “C:\Users\Chris\Documents\Anki\addons\beetime\config.py”, line 21, in save
self.col.setMod()
File “C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.collection”, line 110, in setMod
AttributeError: ‘NoneType’ object has no attribute ‘mod’


#29

I have it working now. Here’s what I think solved it (not completely sure, though).
-Closed Anki
-Followed these steps from a previous post

  1. Deleted the linked Beeminder goal, and created a new one. In my case, I want to have Beeminder for Anki track the number of reviews I make each day.

  2. Installed Beeminder Beta.

  3. Closed and reopened Anki

  4. In Anki, Tools | Setup Beeminder sync
    input user name, API key. Checked Report zero value datapoints.
    clicked on the “Sync number of reviews” box and input the brand new beeminder goal
    Clicked OK (NOT Apply - seems I had problems with this before).

  5. Closed Anki and restarted

  6. It works! I’ve now checked the ‘Sync after synchronizing with AnkiWeb’ checkbox. As a test, I review one card, and manually do an Anki sync The dialog box shows Beeminder Sync automatically kicking in immediately after the Anki sync.

If I have Beeminder android app open, within seconds it has updated the review count (no manual sync needed from the Android app). Quite impressive! Many thanks for your add-on. I’ve tried other add-ons with no luck until yours came along!


#30

How do you find out what your Beeminder API key is?


#31

You’ll see it at beeminder.com/api or https://www.beeminder.com/settings/advanced_settings if you’re signed in


#32

Thank you. I got it set up. However, it reports cumulative minutes every time I sync and so beeminder keeps thinking I’ve reviewed for thousands of minutes each day instead of 5-10.

I’ve spent some time digging around in the settings for my goal trying to find a way for it to accept cumulative data rather than additive and don’t see how to do it. How do I edit the goal to work with the data import?