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
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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

Closed by  Balló György (City-busz)
Sunday, 12 January 2014, 02:16 GMT
Reason for closing:  Not a bug
Comment by Sergej Pupykin (sergej) - Wednesday, 23 October 2013, 12:03 GMT
cannot reproduce, but I did not install mecab-ipadic from AUR
Comment by Christian Bürckert (Kriese) - Wednesday, 23 October 2013, 12:08 GMT
Removed mecab-ipadic from AUR no change.

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__'
Comment by Sergej Pupykin (sergej) - Saturday, 16 November 2013, 18:39 GMT
can it be reproduced with latest anki?
Comment by Christian Bürckert (Kriese) - Saturday, 16 November 2013, 22:16 GMT
I testet it through downloading 2.0.18 in /tmp and changed the path in runanki to this one.
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__'
Comment by Balló György (City-busz) - Saturday, 11 January 2014, 02:15 GMT
I cleaned up dependencies in anki 2.0.20-2. Please remove python2-simplejson from your system, and try again. Is it solve the problem for you?
Comment by Christian Bürckert (Kriese) - Sunday, 12 January 2014, 01:46 GMT
Okay that gave me the hint how to solve it...
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 :)
Comment by Balló György (City-busz) - Sunday, 12 January 2014, 02:16 GMT
Okay, then I'm closing this task.