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

remove assertion that waveforms must have 8 digital outputs #107

Closed
swharden opened this issue Mar 28, 2020 · 0 comments
Closed

remove assertion that waveforms must have 8 digital outputs #107

swharden opened this issue Mar 28, 2020 · 0 comments
Assignees

Comments

@swharden
Copy link
Owner

Dan Orlin sent-in a report that pyABF throws an exception when loading 2015_09_10_0001.abf

File "pyabf/waveform.py", line 142, in addEpoch
    assert len(digitalState) == _DIGITAL_OUTPUT_COUT
AssertionError

That line is here:

assert len(digitalState) == _DIGITAL_OUTPUT_COUT

Embarrassingly there is a variable name in the typo, as "cout" should be "count".

Interestingly, that abf/line doesn't throw an exception in Pyhthon 3.6, 3.7, or 3.6 on Linux, MacOS, or Windows in the automated build system 🤔

I'm thinking that this may be a numpy-version-specific error. Dan is using pyabf 2.2.4 on a 1.5 year old version of Anaconda (Python: 3.6.8, Dec 29 2018).

Solution

Dan said that commenting-out this assertion fixed the problem, so let's replace this assertion with a non-crashing warning.

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