Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214472 - anki-0.9.5.5: ebuild submission
Summary: anki-0.9.5.5: ebuild submission
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Heath Caldwell (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2008-03-24 03:47 UTC by Torsten Stremlau
Modified: 2008-10-02 23:15 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The ebuild of anki (anki-0.9.5.5.ebuild,641 bytes, text/plain)
2008-03-24 03:48 UTC, Torsten Stremlau
Details
Updated to version 0.9.5.6 of anki ebuild (anki-0.9.5.6.ebuild,716 bytes, text/plain)
2008-04-03 20:18 UTC, Torsten Stremlau
Details
Updated to version 0.9.5.7 of anki ebuild (anki-0.9.5.7.ebuild,716 bytes, text/plain)
2008-04-06 11:43 UTC, Torsten Stremlau
Details
New anki ebuild. (anki-0.9.5.7.ebuild,1.48 KB, text/plain)
2008-07-02 18:17 UTC, Heath Caldwell (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Stremlau 2008-03-24 03:47:48 UTC
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
Comment 1 Torsten Stremlau 2008-03-24 03:48:52 UTC
Created attachment 147084 [details]
The ebuild of anki
Comment 2 Torsten Stremlau 2008-04-03 20:18:53 UTC
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.
Comment 3 Torsten Stremlau 2008-04-06 11:43:04 UTC
Created attachment 148835 [details]
Updated to version 0.9.5.7 of anki ebuild
Comment 4 cdep.illabout 2008-04-23 19:35:47 UTC
This works for me on x86.
Comment 5 cdep.illabout 2008-04-23 19:44:12 UTC
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.
Comment 6 Thomas Nichols 2008-04-25 17:57:55 UTC
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.
Comment 7 Heath Caldwell (RETIRED) gentoo-dev 2008-07-02 18:17:44 UTC
Created attachment 159351 [details]
New anki ebuild.
Comment 8 Heath Caldwell (RETIRED) gentoo-dev 2008-07-03 16:16:12 UTC
This is now in the sunrise overlay. You can find it at:
http://overlays.gentoo.org/svn/proj/sunrise/reviewed/app-misc/anki
Comment 9 Heath Caldwell (RETIRED) gentoo-dev 2008-07-09 16:18:21 UTC
Bumped to 0.9.6 in sunrise.
Comment 10 coran.fisher@gmail.com 2008-08-27 17:18:23 UTC
just so you know 0.9.7.3 is out
Comment 11 coran.fisher@gmail.com 2008-08-27 17:21:39 UTC
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.)
Comment 12 Heath Caldwell (RETIRED) gentoo-dev 2008-08-27 20:17:41 UTC
(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.
Comment 13 coran.fisher@gmail.com 2008-08-27 20:47:15 UTC
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>}

Comment 14 Heath Caldwell (RETIRED) gentoo-dev 2008-08-27 21:12:20 UTC
(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?
Comment 15 coran.fisher@gmail.com 2008-08-27 21:20:52 UTC
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. 
Comment 16 coran.fisher@gmail.com 2008-08-30 14:47:07 UTC
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
Comment 17 Heath Caldwell (RETIRED) gentoo-dev 2008-09-09 17:41:21 UTC
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.
Comment 18 coran.fisher@gmail.com 2008-09-09 17:53:59 UTC
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.   
Comment 19 coran.fisher@gmail.com 2008-09-09 19:35:14 UTC
Oh yes, I am running 32bit x86
Comment 20 coran.fisher@gmail.com 2008-09-09 19:44:15 UTC
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. 
Comment 21 coran.fisher@gmail.com 2008-09-09 21:18:18 UTC
As this is a sqlite bug I opened https://bugs.gentoo.org/show_bug.cgi?id=237222
Comment 22 Heath Caldwell (RETIRED) gentoo-dev 2008-09-30 21:50:15 UTC
Bumped to 0.9.8.1 in sunrise.
Comment 23 Heath Caldwell (RETIRED) gentoo-dev 2008-10-02 23:15:38 UTC
In cvs.