Beta Anki friendly intelligent flashcards


milkshake said:
why dont you upload to the repo?

http://repo.openpandora.org :p

Looks good, but I don't see an Education category. I think I'll upload it as a Utility.
 
Last edited by a moderator:
stick to the freedesktop category standards :)
they are what the pandora uses and are officially part of the PXML spec and the repo spec :)

I would say for your app.

category: Education
subcategory: Languages

EDIT:
well I don't know what subcategory this would fall under as its a learning tool
 
reposting here

hi getting this error

----------
[------------------------------]{ App start }[---------------------------------]
Traceback (most recent call last):
File "lib/python2.7/site-packages/ankiqt/anki", line 28, in <module>
ankiqt.run()
File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/ankiqt/__init__.py", line 78, in run
import config
File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/ankiqt/config.py", line 10, in <module>
from anki.utils import genID
File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/../libanki/anki/__init__.py", line 58, in <module>
from anki.deck import DeckStorage
File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/../libanki/anki/deck.py", line 12, in <module>
import types, traceback, simplejson, datetime
File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/__init__.py", line 111, in <module>
if (oldConf and os.path.exists(oldConf) and not os.path.exists(
File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/decoder.py", line 7, in <module>
File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/scanner.py", line 10, in <module>
File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/scanner.py", line 6, in _import_c_make_scanner
File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/_speedups.py", line 7, in <module>
File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/_speedups.py", line 4, in __bootstrap__
File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 882, in resource_filename
File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1351, in get_resource_filename
File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1406, in _extract_resource
File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 928, in extraction_error
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

[Errno 1] Operation not permitted: '/mnt/utmp/anki/.python-eggs/simplejson-2.1.3-py2.7-linux-armv7l.egg-tmp/simplejson/tmpywzwHG.$extract'

The Python egg cache directory is currently set to:

/mnt/utmp/anki/.python-eggs

Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

[-------------------------------]{ App end }[----------------------------------]
cleanup done
 
First post updated with new PND. This PND should fix your issue, peelie.

PND is now available in the repository.
 
peelie said:
sorry to report still getting same error :(

the latest version from the new repo.openpandora.org doesn't start with my pandora either. I deleted the appdata folder and put the anki pnd file in the menu folder. after I click the anki link a new anki subfolder is beeing created in appdata which disappears after a few seconds. That's all Anki does right now.

Where do I get this debug output peelie posted? I would gladly add that info if it helps.
 
Last edited by a moderator:
zapman said:
peelie said:
sorry to report still getting same error :(

the latest version from the new repo.openpandora.org doesn't start with my pandora either. I deleted the appdata folder and put the anki pnd file in the menu folder. after I click the anki link a new anki subfolder is beeing created in appdata which disappears after a few seconds. That's all Anki does right now.

Where do I get this debug output peelie posted? I would gladly add that info if it helps.


look for file under filesystem /tmp it should be called anki.out
 
Last edited by a moderator:
Those experiencing problems: Try this PND: (OLD LINK REMOVED. USE TOP POST.)

Did a couple things that might fix the problem (It's not happening on my pandora even using my FAT32 card so these are all guesses)
-chmodded everything inside the PND as 777
-Added some additional python stuff into the PND that showed up in my appdata after running the previous PND
-Set the PYTHON_EGG_CACHE to point to a folder inside appdata (rc1) and now /tmp (rc2)

If it fixes your problem, I'll upload it to the repository as an update.
 
Drack said:
Those experiencing problems: Try this PND: http://dl.dropbox.co...-drack3-rc1.pnd

Did a couple things that might fix the problem (It's not happening on my pandora even using my FAT32 card so these are all guesses)
-chmodded everything inside the PND as 777
-Added some additional python stuff into the PND that showed up in my appdata after running the previous PND
-Set the PYTHON_EGG_CACHE to point to a folder inside appdata

If it fixes your problem, I'll upload it to the repository as an update.

The new anki version doesn't work with a FAT32 formatted SD card, but it does work on a ext3 card. I didn't try the previous version on ext3 so I don't know if the current version is any better then the old one. I tried this on 2 different Pandoras.

This is the log file content for the FAT32 formatted card:
Code:
  sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/UMPAS_SD/pandora/menu//anki-1.2.8-drack3-rc1.pnd -e anki.sh -b anki
  not mounted on loop yet, doing so
  LoopMountedon: 
  /dev/loop1
  Filetype is Squashfs
  Mounting PND (mount -t squashfs) :
  /dev/loop1 on /mnt/pnd/anki type squashfs (ro)
  Filesystem is vfat
  Mounting the Union FS using /media/UMPAS_SD/pandora/appdata/anki as Write directory:
  mount -t aufs -o exec,noplink,dirs=/media/UMPAS_SD/pandora/appdata/anki=rw+nolwh:/mnt/pnd/anki=rr none /mnt/utmp/anki
  none on /mnt/utmp/anki type aufs (rw,si=62899177,noplink)
  none on /mnt/utmp/anki type aufs (rw,si=62899177,noplink)
  [------------------------------]{ App start }[---------------------------------]
  /mnt/utmp/anki
  Traceback (most recent call last):
    File "lib/python2.7/site-packages/ankiqt/anki", line 28, in <module>
      ankiqt.run()
    File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/ankiqt/__init__.py", line 78, in run
      import config
    File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/ankiqt/config.py", line 10, in <module>
      from anki.utils import genID
    File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/../libanki/anki/__init__.py", line 58, in <module>
      from anki.deck import DeckStorage
    File "/mnt/utmp/anki/lib/python2.7/site-packages/ankiqt/../libanki/anki/deck.py", line 12, in <module>
      import types, traceback, simplejson, datetime
    File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/__init__.py", line 111, in <module>
      if (oldConf and os.path.exists(oldConf) and not os.path.exists(
    File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/decoder.py", line 7, in <module>
    File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/scanner.py", line 10, in <module>
    File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/scanner.py", line 6, in _import_c_make_scanner
    File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/_speedups.py", line 7, in <module>
    File "/mnt/utmp/anki/lib/python2.7/site-packages/simplejson-2.1.3-py2.7-linux-armv7l.egg/simplejson/_speedups.py", line 4, in __bootstrap__
    File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 882, in resource_filename
    File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1351, in get_resource_filename
    File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1406, in _extract_resource
    File "/mnt/utmp/anki/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 928, in extraction_error
  pkg_resources.ExtractionError: Can't extract file(s) to egg cache
  
  The following error occurred while trying to extract file(s) to the Python egg
  cache:
  
    [Errno 1] Operation not permitted: '/mnt/utmp/anki/.python-eggs/simplejson-2.1.3-py2.7-linux-armv7l.egg-tmp/simplejson/tmpBxJlVF.$extract'
  
  The Python egg cache directory is currently set to:
  
    /mnt/utmp/anki/.python-eggs
  
  Perhaps your account does not have write access to this directory?  You can
  change the cache directory by setting the PYTHON_EGG_CACHE environment
  variable to point to an accessible directory.
  
  [-------------------------------]{ App end }[----------------------------------]
  cleanup done

This is the log file content for the ext3 formatted card:
Code:
sudo /usr/pandora/scripts/pnd_run.sh -m -p /media/SDext3/pandora/menu//anki-1.2.8-drack3-rc1.pnd -e anki.sh -b anki
 not mounted on loop yet, doing so
 LoopMountedon: 
 /dev/loop1
 Filetype is Squashfs
 Mounting PND (mount -t squashfs) :
 /dev/loop1 on /mnt/pnd/anki type squashfs (ro)
 Filesystem is ext3
 Mounting the Union FS using /media/SDext3/pandora/appdata/anki as Write directory:
 none on /mnt/utmp/anki type aufs (rw,si=64ad0b77)
 none on /mnt/utmp/anki type aufs (rw,si=64ad0b77)
 [------------------------------]{ App start }[---------------------------------]
 /mnt/utmp/anki
 QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed for BOM: Bad file descriptor
 QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
 QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
 [-------------------------------]{ App end }[----------------------------------]
 cleanup done

Thx Drack!
 
Last edited by a moderator:
Thanks for the error log, that's exactly what I needed.

It's pretty much the same situation I ran into back in August with FAT32 cards. Certain filesystem features like changing permissions don't work on filesystems like FAT32. This is OK if the framework takes this into account and doesn't try to do it on a filesystem that it doesn't work on. However, Anki is written in Python, and Python doesn't check the filesystem. It instead checks the operating system. In the Pandora's case, it finds Linux, so it assumes it can do these functions that don't work on FAT32. When they don't work, the program fails to start.

Since the code that's doing this is inside a library that's wrapped up in a python egg, I think it would be going pretty deep to modify it so it didn't try to use these functions. Instead, I'm currently building a PND that will use a folder inside /tmp as its egg cache. This is indeed on the NAND, but it shouldn't need to store more than about 100kb there
 
Zapman, peelie: Try this PND: http://dl.dropbox.com/u/8938380/anki-1.2.8-drack3-rc2.pnd

Let me know if it fixes your problem.
 
Drack said:
Zapman, peelie: Try this PND: http://dl.dropbox.co...-drack3-rc2.pnd

Let me know if it fixes your problem.

Good job Drack, you fixed the problem! Anki now starts fine on a FAT32 formatted SD card!! Thank you very much!! :)



PS: After checking two installed decks, Anki shut down and since then the Pandora start menu has vanished. Will have to investigate this and will report back soon.

PPS: fixed the missing Pandora menu by follwing these instructions. Don't know what caused the menu disappearing in the first place though.

There seem to be some problems with Anki on Xfce:
# Anki isn't running in a window anymore, so you can't minimize or rescale anything. That's a problem when you want to tab out to some other program. Pressing and holding the Pandora button is a work around but somehow sub-optimal.

# The bottom status bar is about 80% out of the visible area (toolbar already moved to the side). As Anki doesn't have any window handles there is no way to move the whole thing up (the F2 options influence this, some tweaking here helped. Somehow managed to make everything visible, not sure how I did it. After restarting Anki the status bar at the bottom isn't visible anymore and the answer buttons are only half visible :/).

# Downloading new decks doesn't work. atm The error message is about script errors in urllib2.py . Have a look at the screenshot pls:



Altogether Anki runs fine but there are still problems with the scaling of content and layout. Often you are missing things at the bottom of the screen. That's a pity because there would be enough space but the layout isn't optimized for 480px vertical size yet.
 
Last edited by a moderator:
zapman said:
PS: After checking two installed decks, Anki shut down and since then the Pandora start menu has vanished. Will have to investigate this and will report back soon.
PPS: fixed the missing Pandora menu by follwing these instructions. Don't know what caused the menu disappearing in the first place though.
I have never seen this happen, using Anki for 300 cards/day on my Pandora (sometimes on minimenu, sometimes on xfce). Can't say anything comes to mind about what caused it for you, but let me know if it happens again.

There seem to be some problems with Anki on Xfce:
# Anki isn't running in a window anymore, so you can't minimize or rescale anything. That's a problem when you want to tab out to some other program. Pressing and holding the Pandora button is a work around but somehow sub-optimal.

# The bottom status bar is about 80% out of the visible area (toolbar already moved to the side). As Anki doesn't have any window handles there is no way to move the whole thing up (the F2 options influence this, some tweaking here helped. Somehow managed to make everything visible, not sure how I did it. After restarting Anki the status bar at the bottom isn't visible anymore and the answer buttons are only half visible :/).
When I run it from Xfce I get a title bar with minimize, maximize, close. Maximizing it sometimes gets everything to fit on the screen. I'll post screenshots later.
# Downloading new decks doesn't work. atm The error message is about script errors in urllib2.py . Have a look at the screenshot pls:
Basically the error message says you're not connected to the internet (though I see the wifi icon saying you are). I've been able to download plugins and sync personal decks OK. Haven't tried a public deck. One thing I've noticed is that if I connect my wifi after starting Anki then it won't be able to use the connection. Try restarting Anki.

Altogether Anki runs fine but there are still problems with the scaling of content and layout. Often you are missing things at the bottom of the screen. That's a pity because there would be enough space but the layout isn't optimized for 480px vertical size yet.
Yeah. This is why I disable the toolbar and sometimes run from minimenu to get rid of the taskbar too. This version of Anki is designed for desktop computers that have resolutions far exeeding the Pandora's. There's not a whole lot I can do about this unless I want to learn PyQt and fork my own version of Anki to rewrite the GUI. Keep in mind that I didn't create Anki (the program was written by Damien Elmes), so this would be a huge task.
 
Last edited by a moderator:
The problem with the missing title bar is gone after I deleted the anki app folder. With fresh standard settings, the title bar with min/max/close is back again. One click on maximize solved all problems with anki not showing all content! Very nice!

I had to fiddle around with the sync and downloading decks though. What I learned is that Anki can be a real pain in the ass if you don't have a reliable inet connection: I got hangs as anki couldn't finish the sync-on-end and had to kill the process manually. This resulted in the deck beeing deleted on the local side. I re-downloaded the deck and tried to resync from the remote location but got a strange deck instead (example: Deck 129834958495 instead of Deck 12) with the correct content but without any of my learning process included. A virgin version of my study deck so to say.. omg! all history lost!

The webinterface of my Anki account showed this as a new deck besides the Deck 12 though, so I deleted the appfolder again, deleted the new version Deck 12e84783908430 and changed the wifi channel of my router from 2 to 13. Everything seems to be working now! Hangs due to the bad inet connection are gone with the channel switching.

Thx Drack! You made my day. And the say of my wife who actually uses Anki :) Many thanks from her as well!
 
Drack, embedded .jpg aren't displayed at all.

Instead there is a small icon that indicates that there should be an image. Having Anki on ext3 or FAT doesn't make a difference. You could try the public deck 'Countries, Capitals, Flag, Oceans of the world', which has jpgs only, works on a windows machine but not on the Pandora. It's about 10MB big.

png files work ok and are displayed properly.

Could you have a look into the jpg problem please?

Thx!
 
Back
Top