FS#37449 - [anki] json.version
Attached to Project:
Community Packages
Opened by Christian Bürckert (Kriese) - Tuesday, 22 October 2013, 16:26 GMT
Last edited by Balló György (City-busz) - Sunday, 12 January 2014, 02:16 GMT
Opened by Christian Bürckert (Kriese) - Tuesday, 22 October 2013, 16:26 GMT
Last edited by Balló György (City-busz) - Sunday, 12 January 2014, 02:16 GMT
|
Details
Description:
After installing anki according to the archwiki the following Error occurs: $ anki Traceback (most recent call last): File "/usr/bin/anki", line 5, in <module> import aqt File "/usr/share/anki/aqt/__init__.py", line 6, in <module> from aqt.qt import * File "/usr/share/anki/aqt/qt.py", line 7, in <module> from anki.utils import isWin, isMac File "/usr/share/anki/anki/__init__.py", line 18, in <module> if json.__version__ < "1.7.3": AttributeError: 'module' object has no attribute '__version__' Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: - Installing according to the arch wiki entry https://wiki.archlinux.org/index.php/Anki - Startup Anki |
This task depends upon
For me it looks like it uses some wrong python libraries... I'm using gnome3.
Do you need further information?
Optionale Abhängigkeiten für anki
python2-matplotlib: show graphs[Installiert]
sox: audio recording[Installiert]
portaudio[Installiert]
[christian@mentor ~]$ anki
Traceback (most recent call last):
File "/usr/bin/anki", line 5, in <module>
import aqt
File "/usr/share/anki/aqt/__init__.py", line 6, in <module>
from aqt.qt import *
File "/usr/share/anki/aqt/qt.py", line 7, in <module>
from anki.utils import isWin, isMac
File "/usr/share/anki/anki/__init__.py", line 18, in <module>
if json.__version__ < "1.7.3":
AttributeError: 'module' object has no attribute '__version__'
After executing I get a syntax error which seems to be caused by the difference from python2.7 to python3.3
Running it with python2.7 and python2 produces the same error as reported.
(sudo make install ; anki produces also the syntax error ImportError, e)
[christian@mentor anki-2.0.18]$ ./runanki <---- python3.3 is default
Traceback (most recent call last):
File "./runanki", line 5, in <module>
import aqt
File "/tmp/anki-2.0.18/aqt/__init__.py", line 32
except ImportError, e:
^
SyntaxError: invalid syntax
[christian@mentor anki-2.0.18]$ python2.7 runanki
Traceback (most recent call last):
File "runanki", line 5, in <module>
import aqt
File "/tmp/anki-2.0.18/aqt/__init__.py", line 12, in <module>
from aqt.qt import *
File "/tmp/anki-2.0.18/aqt/qt.py", line 7, in <module>
from anki.utils import isWin, isMac
File "/tmp/anki-2.0.18/anki/__init__.py", line 20, in <module>
if json.__version__ < "1.7.3":
AttributeError: 'module' object has no attribute '__version__'
Somehow (at least) three of my python2 packages had an PGP error... I don't really understand what that means but after removing them properly and reinstalling them I could get it running...
Here the steps I did take:
pacman -R python2-simplejson python2-pysqlite python2-beautifulsoup3
pacman -S python2-simplejson python2-pysqlite python2-beautifulsoup3
which gave me a PGP error:
Fehler: python2-beautifulsoup3: signature from "Giovanni Scafora <giovanni@archlinux.org>" is invalid
:: Datei /var/cache/pacman/pkg/python2-beautifulsoup3-3.2.1-2-any.pkg.tar.xz ist beschädigt (Ungültiges oder beschädigtes Paket (PGP-Signatur)).
Soll die Datei entfernt werden? [J/n]
Fehler: Konnte den Vorgang nicht durchführen (Ungültiges oder beschädigtes Paket (PGP-Signatur))
pacman -S --force python2-simplejson python2-pysqlite python2-beautifulsoup3
to overwrite existing files on the FS...
and then reinstall anki (it needed to be removed to remove python2-beautifulsoup3)
and changed the line in /usr/share/anki
>#!/usr/bin/env python to #!/usr/bin/env python2.7
now it runs perfectly :)