cornedriesprong / mingus

Automatically exported from code.google.com/p/mingus
GNU General Public License v3.0
0 stars 0 forks source link

midi modules not useable if fluidsynth is not installed #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In Python 2.5, when I try 'import mingus.midi.MidiFileOut', I get the 
following:

   import mingus.midi.MidiFileOut
  File "C:\Python25\Lib\site-packages\mingus\midi\__init__.py", line 28, in 
<module>
    import fluidsynth
  File "C:\Python25\Lib\site-packages\mingus\midi\fluidsynth.py", line 43, 
in <module>
    import pyFluidSynth as fs
  File "C:\Python25\Lib\site-packages\mingus\midi\pyFluidSynth.py", line 
27, in <module>
    _fl = CDLL(find_library('fluidsynth'))
  File "C:\Python25\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: expected string or Unicode object, NoneType found

I don't have fluidsynth installed, but shouldn't the midi file classes work 
without it?

Original issue reported on code.google.com by austinlu...@gmail.com on 7 Jan 2009 at 10:10

GoogleCodeExporter commented 9 years ago
You're right, fluidsynth shouldn't load. Thanks for letting me know. I fixed 
the bug
in mingus.midi.__init__. You can update your local copy or download version 
0.3.7.9.

Original comment by Rhijnauwen@gmail.com on 7 Jan 2009 at 10:51

GoogleCodeExporter commented 9 years ago
I have a similar problem :

Traceback (most recent call last):
  File "C:\Python25\mingus_examples\pygame-piano\pygame-piano.py", line 45, in <module>
    from mingus.midi import fluidsynth
  File "C:\Python25\Lib\site-packages\mingus\midi\fluidsynth.py", line 43, in <module>
    import pyFluidSynth as fs
  File "C:\Python25\Lib\site-packages\mingus\midi\pyFluidSynth.py", line 27, in <module>
    _fl = CDLL(find_library('fluidsynth'))
  File "C:\Python25\lib\ctypes\__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: expected string or Unicode object, NoneType found

Original comment by lecerfl...@gmail.com on 15 Feb 2009 at 8:00

GoogleCodeExporter commented 9 years ago
That means the FluidSynth library can't be found. If you haven't installed it, 
then
do so. If you are on windows then be sure to check the installation 
instructions that
you can find in the wiki (because then you need to download qsynth and rename 
the dll).

Original comment by Rhijnauwen@gmail.com on 15 Feb 2009 at 8:05