Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError on opening file #13

Open
mishaturnbull opened this issue Nov 13, 2018 · 0 comments
Open

IndexError on opening file #13

mishaturnbull opened this issue Nov 13, 2018 · 0 comments

Comments

@mishaturnbull
Copy link

I've just installed binglide on Debian 4.18 (specifically, Kali Linux) and am having an error whenever I try to open a file. Binglide opens fine, and I can click the Open button and select a file, but as soon as I try to load the file I get the following error message in the console.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 108, in open_file
    self.read_file(f)
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 102, in read_file
    self.update_data()
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 116, in update_data
    self.calc_entropy.set_data(self.data)
  File "/usr/local/lib/python3.6/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.6/dist-packages/binglide/calcs.py", line 201, in calc_entropy
    ent += increments[fo]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

I'm not entirely convinced this isn't related to issue #8, but I'm also not convinced it is. They're both errors on startup, but applying the patch in PR #11 didn't help me. I'd be happy to open a PR to fix this, but I'm not quite familiar enough with binglide to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant