A new ebuild for Anki, a spaced repetition learning system. Please add it to portage. The homepage of anki is at: http://www.ichi2.net/anki/index.html Reproducible: Always
Created attachment 147084 [details] The ebuild of anki
Created attachment 148499 [details] Updated to version 0.9.5.6 of anki ebuild New version 0.9.5.6 Also added a few new dependencies I missed last time.
Created attachment 148835 [details] Updated to version 0.9.5.7 of anki ebuild
This works for me on x86.
One (small) problem. When I run anki, it gives me this error: $ anki Warning, pygame not available. No sounds will play. Installing python-psyco is strongly recommended. But other than that, it works great.
Works fine on x86 for me too -- I added ~x86 to keywords in the ebuild, then unmasked in /etc/portage/package.keywords: app-misc/anki ** dev-python/simplejson ** dev-python/matplotlib ** dev-python/sqlalchemy ** and all now works sweetly.
Created attachment 159351 [details] New anki ebuild.
This is now in the sunrise overlay. You can find it at: http://overlays.gentoo.org/svn/proj/sunrise/reviewed/app-misc/anki
Bumped to 0.9.6 in sunrise.
just so you know 0.9.7.3 is out
I tried just renaming the sunrise ebuild but even after deleating .anki and the .anki files and opening a sample deck it would load a card but not prgress when i tried to answer (make a mistake etc.)
(In reply to comment #11) I'll add a version bump to the sunrise overlay for 0.9.7.3 but I can't duplicate your issue. Try running anki from a virtual terminal and see if it gives you any output when you see the problem. I'll wait for your reply before bumping the version.
I just was using 0.9.6 which still works fine, I upgraded (by copying ebuild) to 0.9.7.3 again and reinstalled PyQt4, sqlalchemy, simplejson, pysqlite, dvipng, numpy, matlotlib, pygame, and kakasi. Here's what I get on the console: $ anki Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/ankiqt/ui/main.py", line 342, in <lambda> lambda i=i: self.cardAnswered(i)) File "/usr/lib/python2.5/site-packages/ankiqt/ui/main.py", line 196, in cardAnswered self.deck.answerCard(self.currentCard, quality) File "/usr/lib/python2.5/site-packages/anki/deck.py", line 198, in answerCard card.toDB(self.s) File "/usr/lib/python2.5/site-packages/anki/cards.py", line 228, in toDB where id=:id""", self.__dict__) File "/usr/lib/python2.5/site-packages/sqlalchemy/orm/session.py", line 628, in execute return self.__connection(engine, close_with_result=True).execute(clause, params or {}) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 844, in execute return Connection.executors[c](self, object, multiparams, params) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 854, in _execute_text self.__execute_raw(context) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 916, in __execute_raw self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 960, in _cursor_execute self._handle_dbapi_exception(e, statement, parameters, cursor) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 942, in _handle_dbapi_exception raise exceptions.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect) sqlalchemy.exceptions.IntegrityError: (IntegrityError) cards.relativeDelay may not be NULL 'update cards set\nmodified=:modified,\ntags=:tags,\ninterval=:interval,\nlastInterval=:lastInterval,\ndue=:due,\nlastDue=:lastDue,\nfactor=:factor,\nlastFactor=:lastFactor,\nfirstAnswered=:firstAnswered,\nreps=:reps,\nsuccessive=:successive,\naverageTime=:averageTime,\nreviewTime=:reviewTime,\nyoungEase0=:youngEase0,\nyoungEase1=:youngEase1,\nyoungEase2=:youngEase2,\nyoungEase3=:youngEase3,\nyoungEase4=:youngEase4,\nmatureEase0=:matureEase0,\nmatureEase1=:matureEase1,\nmatureEase2=:matureEase2,\nmatureEase3=:matureEase3,\nmatureEase4=:matureEase4,\nyesCount=:yesCount,\nnoCount=:noCount,\nspaceUntil = :spaceUntil,\nrelativeDelay = :interval / (strftime("%s", "now") - :due + 1),\nisDue = :isDue,\ntype = :type,\ncombinedDue = max(:spaceUntil, :due)\nwhere id=:id' {'isDue': False, 'successive': 1, '_state': <sqlalchemy.orm.attributes.InstanceState object at 0x8b8022c>, 'cardModel': <anki.models.CardModel object at 0x8b80d8c>, 'lastShown': 1219869798.519074, 'youngEase0': 0, 'youngEase1': 1, 'youngEase2': 1, 'youngEase3': 0, 'youngEase4': 0, 'id': -2130669280, 'matureEase1': 0, 'priority': 2, 'matureEase3': 0, 'matureEase2': 0, 'matureEase4': 0, 'spaceUntil': 0, 'cardModelId': -1863245018, 'question': u'naked', 'due': 1219920831.0130112, 'firstAnswered': 1219858088.279279, '_entity_name': None, 'factor': 2.5, 'answer': u'\u88f8<br>\u306f\u3060\u304b', 'lastFactor': 2.5, 'type': 1, '_instance_key': (<class 'anki.cards.Card'>, (-2130669280,), None), 'ordinal': 0, 'relativeDelay': 0.0, 'tags': u'', 'reps': 2, 'factId': -2130669280, 'reviewTime': 3.6340920925140381, 'noCount': 1, '_sa_session_id': 144879404, 'yesCount': 1, 'created': 1185997094.755549, 'matureEase0': 0, 'combinedDue': 1219858688.2718279, 'interval': 0.59061182908809207, 'modified': 1219869802.15323, 'lastInterval': 0, '_thinkingTime': 3.6340920925140381, 'fuzz': 1.0381767546572549, 'lastDue': 1185997094.7556009, 'averageTime': 3.6340920925140381, 'fact': <anki.facts.Fact object at 0x8b788ac>}
(In reply to comment #13) Hmm. What version of python are you using (and with what use flags), and what sample deck are you using to test it? Also, what version of sqlalchemy and pysqlite do you have installed?
dev-lang/python-2.5.2-r7 (berkdb gdbm ipv6 ncurses readline sqlite ssl threads tk -bootstrap -build -doc -elibc_uclibc -examples -ucs2 -wininst) I am using the JLPT2 sample deck. I am also trying deleting mydeck* and the backups. dev-python/sqlalchemy-0.4.7_p1 (just upgraded) (mysql sqlite -doc -examples -firebird -mssql -postgres -test) dev-python/pysqlite-2.4.1 (-examples) I'm back on 0.9.6 and working again.
I posted to the anki forum and they pointed me to this anki bug http://code.google.com/p/anki/issues/detail?id=111 it appears that my problem is sqlite I was running sqlite 3.5.9 which is stable on gentoo. I downgraded to sqlite 3.5.6 and immediatly anki-0.9.7.4 (which also exhibited the problem) worked fine. So if you bump the ebuild I'd put something in about sqlite 3.5.9
I was unable to duplicate the issue with sqlite 3.5.9 with either anki 0.9.7.4 or 0.9.7.8. Did you try reinstalling sqlite 3.5.9? What arch are you using? I bumped the version in sunrise to 0.9.7.8 without adding another restriction to the sqlite version. Let's see if anyone else sees the same problem.
Indeed I had reinstalled it maybe 5 or 6 times along with the other dependencies. It seems related to anki bug which pointed to a debian bug on sqlite, indeed downgrading fixed me immediately. Oh well if someone else runs into it hopefully they see this and downgrade sqlite or wait for the next version which is supposed to fix it.
Oh yes, I am running 32bit x86
This is the Debian entry on this sqlite bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488864 I get the same problems in that bug with sqlite 3.5.9 in Gentoo. It works normally when downgraded. You can compare with sqlite 2.x which also works just like previous 3.x versions. Try this: >sqlite3 SQLite version 3.5.9 Enter ".help" for instructions sqlite> select 1.0/2.0; 0.5 sqlite> select 1.0/3.0; sqlite> select 1.0/4.0; 0.25 sqlite> select 1.0/5.0; sqlite> select 1.0/6.0; sqlite> select 1.0/7.0; sqlite> select 1.0/8.0; 0.125 sqlite> select 1.0/9.0; sqlite> select 1.0/10.0; sqlite> Here are the version 2 results. >sqlite SQLite version 2.8.17 Enter ".help" for instructions sqlite> select 1.0/2.0; 0.5 sqlite> select 1.0/3.0; 0.333333333333333 sqlite> select 1.0/4.0; 0.25 sqlite> select 1.0/5.0; 0.2 sqlite> select 1.0/6.0; 0.166666666666667 sqlite> select 1.0/7.0; 0.142857142857143 sqlite> select 1.0/8.0; 0.125 sqlite> select 1.0/9.10; 0.10989010989011 sqlite> select 1.0/10.0; 0.1 sqlite> See how you get blank answers on sqlite 3.5.9? 3.5.6 does not have this issue.
As this is a sqlite bug I opened https://bugs.gentoo.org/show_bug.cgi?id=237222
Bumped to 0.9.8.1 in sunrise.
In cvs.