m4myo / python-mplayer

Automatically exported from code.google.com/p/python-mplayer
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Installation fails with KeyError #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download mplayer.py-0.7.0.tar.gz
2. Run "sudo python setup.py install"

What is the expected output? What do you see instead?
- Expectation: successful installation.
- Instead of successfully installing, a "KeyError: u'UNKNOWN'" is shown.

What version of the product are you using? On what operating system?
- mplayer.py v0.7.0 on Linux Mint 14 MATE edition, x64

Please provide any additional information below.
- Fix:

In core.py, line 252, change this:

t = mtypes.type_map[arg]
sig.append('{0}{1}{2}'.format(t.name, i, optional))
types.append('mtypes.{0},'.format(t.__name__))

to this:

if(arg in mtypes.type_map):
    t = mtypes.type_map[arg]
    sig.append('{0}{1}{2}'.format(t.name, i, optional))
    types.append('mtypes.{0},'.format(t.__name__))

This gets rid of the KeyError during installation.

Original issue reported on code.google.com by rahdic...@gmail.com on 20 May 2013 at 4:51