Ubuntu 16.04 -- numba JIT type errors in calc.py and BadDrawable error in gui.py
Running binglide with any file as input results in numba JIT type errors:
Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 14 (X_GetGeometry) Resource id: 0x4600015 /usr/local/lib/python3.5/dist-packages/numba/init.py:75: UserWarning: llvmlite version format not recognized! warnings.warn("llvmlite version format not recognized!") Traceback (most recent call last): File "/usr/local/bin/binglide", line 7, in
binglide.main() File "/usr/local/lib/python3.5/dist-packages/binglide/init.py", line 21, in main binglideui.read_file(args.file) File "/usr/local/lib/python3.5/dist-packages/binglide/gui.py", line 102, in read_file self.update_data() File "/usr/local/lib/python3.5/dist-packages/binglide/gui.py", line 116, in update_data self.calc_entropy.set_data(self.data) File "/usr/local/lib/python3.5/dist-packages/binglide/calcs.py", line 241, in set_data calc_entropy(data, self.s, shannon, hist, window, increments, decrements) File "/usr/local/lib/python3.5/dist-packages/numba/dispatcher.py", line 277, in _compile_for_args return self.compile(tuple(real_args)) File "/usr/local/lib/python3.5/dist-packages/numba/dispatcher.py", line 495, in compile cres = self._compiler.compile(args, return_type) File "/usr/local/lib/python3.5/dist-packages/numba/dispatcher.py", line 76, in compile flags=flags, locals=self.locals) File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 696, in compile_extra return pipeline.compile_extra(func) File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 369, in compile_extra return self.compile_bytecode(bc, func_attr=self.func_attr) File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 378, in compile_bytecode return self._compile_bytecode() File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 662, in _compile_bytecode res = pm.run(self.status) File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 257, in run raise patched_exception File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 249, in run stage() File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 466, in stage_nopython_frontend self.locals) File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 807, in type_inference_stage infer.propagate() File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 613, in propagate raise errors[0] numba.errors.TypingError: Failed at nopython (nopython frontend) Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x7fbcb48bbf60>: --%<----------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 114, in propagate constraint(typeinfer) File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 384, in call self.resolve(typeinfer, typeinfer.typevars, fnty=self.func) File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 344, in resolve sig = context.resolve_function_type(fnty, pos_args, kw_args) File "/usr/local/lib/python3.5/dist-packages/numba/typing/context.py", line 112, in resolve_function_type res = defn.apply(args, kws) File "/usr/local/lib/python3.5/dist-packages/numba/typing/templates.py", line 185, in apply sig = generic(args, kws) File "/usr/local/lib/python3.5/dist-packages/numba/typing/arraydecl.py", line 162, in generic out = get_array_index_type(ary, idx) File "/usr/local/lib/python3.5/dist-packages/numba/typing/arraydecl.py", line 68, in get_array_index_type % (ty, idx)) TypeError: unsupported array index type float64 in [float64] --%<----------------------------------------------------------------- File "../../../usr/local/lib/python3.5/dist-packages/binglide/calcs.py", line 206
Setting environment variable NUMBA_DISABLE_JIT to diagnose the error gets a bit farther, but the program then fails with the BadDrawable error in gui.py
The second set of problems appears related to type safety changes in Numpy -- http://docs.scipy.org/doc/numpy/release.html#future-changes
I fixed a couple of these and things are somewhat functional with the exception of tri-gram visualization loading but never updating when selecting subsets of the file.
Changes to fix a couple of numpy related type errors: projectors.py, line 38: data = np.pad(data, ((0, int(nsize - size)), (0, 0)), 'constant')
mixers.py, line 30: colored[..., c] = colored[..., c] + data * coefs[c]
So, the program runs, but with JIT disabled and a few GUI glitches including lack of updating for the tri-gram view.
Hi James, I'm happy to see that there's activity on this repo. I'm a developer on a different visualization project. I just wanted to let you know I get notifications, so I'm lurking here right now. I figure it's a small world. I don't know if I'll have time to contribute, but I'm definitely keeping an eye on this repo. This is my stuff: https://dnaskittle.com/learn/
@josiahseaman That looks awesome, I'll have to check it.
As for the issue at hand I haven't worked with binglide in a while myself but I'll try to find some time to look at this in the near future, thanks for reporting!