Hide Forgot
Description of problem: kdeedu has a plugin for parley that downloads sounds from wiktionary. This plugin embeds a copy of python-mwclient. mwclient in turn embeds a copy of python-simplejson. These needs to be packaged separately (python-simplejson is in Fedora; python-mwclient is not) Additionally, this plugin is broken. It asks for a simplejson.scanner.Scanner() object but the simplejson that is included does not have this code. it doesn't exist in simplejson-2.0.9 either. However, it does exist in python-2.6's json modules (simplejson was imported into python for 2.6/3.0). So, for kdeedu on F-11+, the fix for mwclient would be to use: import json as simplejson Version-Release number of selected component (if applicable): kdeedu-4.3.0-6.fc11.i586 How reproducible: Every time Steps to Reproduce: 1. $ parley 2. 3. Actual results: Get a traceback on the console that has this: File "/usr/share/kde4/apps/parley/plugins/wiktionary_sound.py", line 14, in <module> import mwclient [...] File "<string>", line 18, in _import File "/usr/share/kde4/apps/parley/plugins/mwclient/simplejson/decoder.py", line 6, in <module> from simplejson.scanner import Scanner, pattern " ImportError: cannot import name Scanner Expected results: parley runs with system libraries and does not traceback. Additional info:
mwclient home page: http://sourceforge.net/apps/mediawiki/mwclient/
Regarding the traceback; I've looked at the code that's causing it. When kdeedu is changed to import the system python-mwclient, the traceback will go away. The traceback is occurring because the embedded mwclient is importing the embedded simplejson which is then importing the system version of simplejson.scanner -- which has no Scanner() object. Moving all this out to system versions will make it self-consistent.
python-mwclient review underway in bug #523789
OK, using the copy of mwclient from bug #523789, I get python error(s): fetching sound checking sound for bar Language: En-us Word: bar Kross: "PythonInterpreter::extractException: File "/usr/share/kde4/apps/parley/plugins/wiktionary_sound.py", line 26, in fetchSound fetchSoundForTranslation(word) File "/usr/share/kde4/apps/parley/plugins/wiktionary_sound.py", line 35, in fetchSoundForTranslation soundfile = getWikiObject(wikiLocale, word.text, None) File "/usr/share/kde4/apps/parley/plugins/wiktionary_sound.py", line 75, in getWikiObject commons = mwclient.Site('commons.wikimedia.org') File "/usr/lib/python2.6/site-packages/mwclient/client.py", line 84, in __init__ self.site_init() File "/usr/lib/python2.6/site-packages/mwclient/client.py", line 103, in site_init self.version = (int(version[0]), int(version[1][:-5]), 'alpha-wmf') " ValueError: invalid literal for int() with base 10: '16alph'
That needs to be patched in python-mwclient. (The [1][:-5] in line 103 of client.py needs to be changed to [:-9]. They didn't count the "-wmf".)
Looks like it was a bug in mwclient-0.6.3 fixed already in their upstream trunk/ , we can apply the patch before building/updating anything.
(To be clear, [1][:-5] needs to be changed to [1][:-9].)
step1 of fixing this, omitting the broken/embedded copy of mwclient/simplejson: %changelog * Sun Sep 20 2009 Rex Dieter <rdieter> - 4.3.1-2 - kdeedu embeds python-mwclient and it's broken (#520954) - Requires: kross-python when python-mwclient becomes available, we'll add a Requires: python-mwclient here
python-mwclient-0.6.3-3.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/python-mwclient-0.6.3-3.fc10
python-mwclient-0.6.3-3.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/python-mwclient-0.6.3-3.fc11
kdeedu-4.3.1-3.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/kdeedu-4.3.1-3.fc11
kdeedu-4.3.1-3.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/kdeedu-4.3.1-3.fc10
python-mwclient-0.6.3-3.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-mwclient'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9804
python-mwclient-0.6.3-3.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update python-mwclient'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9834
kdeedu-4.3.1-3.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update kdeedu'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9935
kdeedu-4.3.1-3.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update kdeedu'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9949
kdeedu-4.3.1-4.fc11, digikam-0.10.0-3.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update kdeedu digikam'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9935
kdeedu-4.3.1-4.fc10, digikam-0.10.0-3.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update kdeedu digikam'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9949
kdeedu-4.3.1-4.fc11, digikam-0.10.0-3.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
kdeedu-4.3.1-4.fc10, digikam-0.10.0-3.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
python-mwclient-0.6.3-3.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
python-mwclient-0.6.3-3.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.