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

improve ATF error handling #73

Closed
swharden opened this issue Jan 26, 2019 · 1 comment
Closed

improve ATF error handling #73

swharden opened this issue Jan 26, 2019 · 1 comment
Assignees

Comments

@swharden
Copy link
Owner

Improve the error message displayed when you accidentally load an ABF into the ATF module. Currently the output is very confusing.

pyabf.ATF("demo.abf")
Traceback (most recent call last):
  File "c:\Users\scott\Documents\GitHub\pyABF/src\pyabf\atf.py", line 39, in __init__
    signature, file_version = fh.readline().rstrip().split()
  File "C:\Users\scott\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 49: character maps to <undefined>
@swharden swharden self-assigned this Jan 26, 2019
@swharden
Copy link
Owner Author

swharden commented Jul 2, 2019

cf82e07

@swharden swharden closed this as completed Jul 2, 2019
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