BEE2.4
BEE2.4 copied to clipboard
Can't compile on Linux - bitmap "../BEE2.ico" not defined
I'm trying to compile BEE2.4 for Debian, and after manually fixing an error in the code (img_error not found), I ran into one that I couldn't fix:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/cx_Freeze-4.3.4-py3.4-linux-x86_64.egg/cx_Freeze/initscripts/Console.py", line 27, in <module>
exec(code, m.__dict__)
File "BEE2.pyw", line 37, in <module>
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2237, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
module = _SpecMethods(spec)._load_unlocked()
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1191, in _load_unlocked
return self._load_backward_compatible()
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1161, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/home/tristan/Downloads/BEE2.4-2.4.0pr20/src/UI.py", line 22, in <module>
import voiceEditor
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2237, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
module = _SpecMethods(spec)._load_unlocked()
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1191, in _load_unlocked
return self._load_backward_compatible()
File "/usr/lib/python3.4/importlib/_bootstrap.py", line 1161, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/home/tristan/Downloads/BEE2.4-2.4.0pr20/src/voiceEditor.py", line 51, in <module>
win.iconbitmap('../BEE2.ico')
File "/usr/lib/python3.4/tkinter/__init__.py", line 1702, in wm_iconbitmap
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "../BEE2.ico" not defined
Desperate, I tried to run BEE2.4 via Wine, but the exact same error occured from the Windows version downloaded from releases. Why is nobody else getting this error?
I hunted through the source code and removed all icons from BEE and it compiled, though of course this is not an ideal solution (neither is having to remove image_error).
EDIT: I'm having issues again:
File "BEE2.pyw", line 124, in <module>
File "/home/tristan/Downloads/BEE2.4-2.4.0pr20/src/UI.py", line 488, in load_packages
attr_commands
File "/home/tristan/Downloads/BEE2.4-2.4.0pr20/src/selectorWin.py", line 304, in from_data
attributes=attrs,
File "/home/tristan/Downloads/BEE2.4-2.4.0pr20/src/selectorWin.py", line 276, in __init__
resize_to=ICON_SIZE,
File "/home/tristan/Downloads/BEE2.4-2.4.0pr20/src/img.py", line 67, in png
img = ImageTk.PhotoImage(image=image)
File "/usr/local/lib/python3.4/dist-packages/PIL/ImageTk.py", line 115, in __init__
self.paste(image)
File "/usr/local/lib/python3.4/dist-packages/PIL/ImageTk.py", line 180, in paste
from PIL import _imagingtk
ImportError: cannot import name '_imagingtk'
It seems all of the errors I've been having are related to images. What's going on?
You might want to install/reinstall Pillow - it's the imaging library used to read in various images used. If it's not working, that would explain why img_error fails as well. (That's a fallback image which is always loaded immediately during the inintialisation of the module, to substitute when an image file can't be found.)
It's a good idea, but I've already tried reinstalling Pillow several times. As mentioned before, I've fixed the issue by ripping out all of the icon code.
I actually just realized that the .ico file is not copied to build_BEE2. Since I already stripped away all the icon code, I can't see if this fixes it or not. I've also had to copy the "compiler" directory manually. All in all, it seems like the build scripts have issues copying files from the source directory on Linux for whatever reason. Possibly related is the fact that several testing elements, such as the vactubes, do not have icons and thus aren't loaded, and that I experienced a crash trying to drag things related to missing icons.
I suggest perhaps to rename this bug to general Linux compilation errors - it seems that filename case-sensitivity is another problem, as some directories are named "bee2" but referenced as "BEE2" in the code. On Windows, this is fine, but it fails on Linux.
- [ ] Assuming that the build scripts are supposed to copy files from source to the compiled directory, this does not work on Linux
- [ ] Linux is case-sensitive to directories, while BEE2 assumes a non-case-sensitive OS
- [ ] I frankly have no idea what's up with img_error, but that's a thing
After some wrangling, I've managed to get BEE2 to work perfectly on Linux, though, so it's definitely possible!
I believe this has been fixed
I'm currently trying to get BEE compiling on Linux (Which is quite a nightmare...) But regarding this issue I can report that BEE tries to copy a file named BEE2.ico
which is actually bee2.ico
. So renaming the file (or symlinking it) fixes this error.