I cloned that in git and started followed the Python 3.7 instructions in "using_EasyABC_in_Windows.txt". All went OK until the last line "python easy_abc.py" when I got the following error message:
Traceback (most recent call last):
File "D:\chris\Home\GitHub\EasyABC\fluidsynth.py", line 39, in <module>
F = CDLL(lib)
File "C:\Users\wc06\AppData\Local\Programs\Python\Python37-32\lib\ctypes__init__.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found</module>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "easy_abc.py", line 112, in <module>
from fluidsynthplayer import *
File "D:\chris\Home\GitHub\EasyABC\fluidsynthplayer.py", line 10, in <module>
import fluidsynth as F
File "D:\chris\Home\GitHub\EasyABC\fluidsynth.py", line 41, in <module>
raise ImportError("Couldn't find the FluidSynth library in the program directory.")
ImportError: Couldn't find the FluidSynth library in the program directory.</module></module></module>
I have downloaded and copied libfluidsynth-2.dll into the folder, as that is the file that fluidsynth.py seems to be looking for, but that hasn't helped.
Any suggestions?
Thanks,
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
IIRC J. W. de Jong is working on replacing gstreamer with fluidsynth. This might be work in progress.
When I last checked this version several months ago, I had to check the source code to find out where exatly it expects to find the DLL. At that time a patched version of libfluidsynth was necessary. This may have changed now.
The directory where it looks for the shared library (./libfluidsynth-2.dll or ./libfluidsynth.so.2) might be the current directory from where you start the program, which is not necessarily the program directory, depending on how you start it. I suggest to check this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had checked this and confirmed that fluidsynth.py could find libfluidsynth-2.dll locally but it turns out it needs to be on the PATH. Fixed that with
set PATH=%PATH%;[path-to-fluidsynth-install]\fluidsynth-Win32\bin
The next error is something to do with wx:
Traceback (most recent call last):
File "easy_abc.py", line 8353, in OnInit
self.frame = self.NewMainFrame()
File "easy_abc.py", line 8312, in NewMainFrame
frame = MainFrame(None, 0, self.app_dir, self.settings)
File "easy_abc.py", line 3666, in init
self.setup_toolbar()
File "easy_abc.py", line 4529, in setup_toolbar
self.flip_tempobox(False)
File "easy_abc.py", line 4421, in flip_tempobox
self.toolbar.Realize()
File "C:\Users\wc06\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wx\lib\agw\aui\auibar.py", line 3141, in Realize
outside_sizer.Add(sizer, 1, self._tool_alignment)
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_VERTICAL)" failed at ....\src\common\sizer.cpp(2077) in wxBoxSizer::DoInsert(): Vertical alignment flags are ignored in vertical sizers
OnInit returned false, exiting...
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ....\src\common\wincmn.cpp(475) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed
Any suggestions welcome.
Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I took a while for me to investigate this issue. FluidSynth should have
been optional, but apparently is wasn't. I found the issue and have
fixed that. The the next error you send was new to me. I could not
reproduce it at first but after uninstalling Python and starting form
scratch with the newest Python 3.8 (32 bit) I now have the same error.
It has something to do with wxPython, that is for sure. It is not clear
to me what is causing this issue, but I will try to find a workaround
for this.
Jan Wybren
On 30-4-2020 14:04, Chris Walshaw wrote:
Thanks.
I had checked this and confirmed that fluidsynth.py could find
libfluidsynth-2.dll locally but it turns out it needs to be on the
PATH. Fixed that with
set PATH=%PATH%;[path-to-fluidsynth-install]\fluidsynth-Win32\bin
The next error is something to do with wx:
Traceback (most recent call last):
File "easy_abc.py", line 8353, in OnInit
self.frame = self.NewMainFrame()
File "easy_abc.py", line 8312, in NewMainFrame
frame = MainFrame(None, 0, self.app_dir, self.settings)
File "easy_abc.py", line 3666, in init
self.setup_toolbar()
File "easy_abc.py", line 4529, in setup_toolbar
self.flip_tempobox(False)
File "easy_abc.py", line 4421, in flip_tempobox
self.toolbar.Realize()
File
"C:\Users\wc06\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wx\lib\agw\aui\auibar.py",
line 3141, in Realize
outside_sizer.Add(sizer, 1, self._tool_alignment)
wx._core.wxAssertionError: C++ assertion "!(flags &
wxALIGN_CENTRE_VERTICAL)" failed at ....\src\common\sizer.cpp(2077) in
wxBoxSizer::DoInsert(): Vertical alignment flags are ignored in
vertical sizers
OnInit returned false, exiting...
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this"
failed at ....\src\common\wincmn.cpp(475) in
wxWindowBase::~wxWindowBase(): any pushed event handlers must have
been removed
I took a while for me to investigate this issue. FluidSynth should have
been optional, but apparently is wasn't. I found the issue and have
fixed that. The the next error you send was new to me. I could not
reproduce it at first but after uninstalling Python and starting form
scratch with the newest Python 3.8 (32 bit) I now have the same error.
It has something to do with wxPython, that is for sure. It is not clear
to me what is causing this issue, but I will try to find a workaround
for this.
More or less followed Chris's footsteps in getting 1.3.7.8 source to run on Win 10 with Python 3.8 and the newest wxPython (4.1?). Similar wxPython problem occurred with horizontal alignment. I couldn't get the settings window to open unless I changed wx.Boxsizer(wx.HORIZONTAL) to wx.Boxsizer(wx.VERTICAL) in lines 2013 and 2629.
You may want to take a more professional look at that at some stage.
Thanks for the great work!
Michael
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'd like to contribute to the project but I haven't managed to get the source code running yet.
The code tab at sourceforge seems to point at an empty repository https://git.code.sf.net/p/easyabc/code but I found a topic here from a couple of years back which pointed to https://github.com/jwdj/EasyABC/.
I cloned that in git and started followed the Python 3.7 instructions in "using_EasyABC_in_Windows.txt". All went OK until the last line "python easy_abc.py" when I got the following error message:
Traceback (most recent call last):
File "D:\chris\Home\GitHub\EasyABC\fluidsynth.py", line 39, in <module>
F = CDLL(lib)
File "C:\Users\wc06\AppData\Local\Programs\Python\Python37-32\lib\ctypes__init__.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found</module>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "easy_abc.py", line 112, in <module>
from fluidsynthplayer import *
File "D:\chris\Home\GitHub\EasyABC\fluidsynthplayer.py", line 10, in <module>
import fluidsynth as F
File "D:\chris\Home\GitHub\EasyABC\fluidsynth.py", line 41, in <module>
raise ImportError("Couldn't find the FluidSynth library in the program directory.")
ImportError: Couldn't find the FluidSynth library in the program directory.</module></module></module>
I have downloaded and copied libfluidsynth-2.dll into the folder, as that is the file that fluidsynth.py seems to be looking for, but that hasn't helped.
Any suggestions?
Thanks,
Chris
IIRC J. W. de Jong is working on replacing gstreamer with fluidsynth. This might be work in progress.
When I last checked this version several months ago, I had to check the source code to find out where exatly it expects to find the DLL. At that time a patched version of libfluidsynth was necessary. This may have changed now.
The directory where it looks for the shared library (
./libfluidsynth-2.dll
or./libfluidsynth.so.2
) might be the current directory from where you start the program, which is not necessarily the program directory, depending on how you start it. I suggest to check this.Thanks.
I had checked this and confirmed that fluidsynth.py could find libfluidsynth-2.dll locally but it turns out it needs to be on the PATH. Fixed that with
set PATH=%PATH%;[path-to-fluidsynth-install]\fluidsynth-Win32\bin
The next error is something to do with wx:
Traceback (most recent call last):
File "easy_abc.py", line 8353, in OnInit
self.frame = self.NewMainFrame()
File "easy_abc.py", line 8312, in NewMainFrame
frame = MainFrame(None, 0, self.app_dir, self.settings)
File "easy_abc.py", line 3666, in init
self.setup_toolbar()
File "easy_abc.py", line 4529, in setup_toolbar
self.flip_tempobox(False)
File "easy_abc.py", line 4421, in flip_tempobox
self.toolbar.Realize()
File "C:\Users\wc06\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wx\lib\agw\aui\auibar.py", line 3141, in Realize
outside_sizer.Add(sizer, 1, self._tool_alignment)
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_VERTICAL)" failed at ....\src\common\sizer.cpp(2077) in wxBoxSizer::DoInsert(): Vertical alignment flags are ignored in vertical sizers
OnInit returned false, exiting...
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ....\src\common\wincmn.cpp(475) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed
Any suggestions welcome.
Chris
Hello Chris,
I took a while for me to investigate this issue. FluidSynth should have
been optional, but apparently is wasn't. I found the issue and have
fixed that. The the next error you send was new to me. I could not
reproduce it at first but after uninstalling Python and starting form
scratch with the newest Python 3.8 (32 bit) I now have the same error.
It has something to do with wxPython, that is for sure. It is not clear
to me what is causing this issue, but I will try to find a workaround
for this.
Jan Wybren
On 30-4-2020 14:04, Chris Walshaw wrote:
Well, it should be fixed now.
https://github.com/jwdj/EasyABC
On 31-5-2020 22:40, J.W. de Jong wrote:
Thanks so much! Will check it out. Chris
Hello,
More or less followed Chris's footsteps in getting 1.3.7.8 source to run on Win 10 with Python 3.8 and the newest wxPython (4.1?). Similar wxPython problem occurred with horizontal alignment. I couldn't get the settings window to open unless I changed wx.Boxsizer(wx.HORIZONTAL) to wx.Boxsizer(wx.VERTICAL) in lines 2013 and 2629.
You may want to take a more professional look at that at some stage.
Thanks for the great work!
Michael