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

Fails to parse buffer-size when file input is used #4

Open
kcghost opened this issue May 18, 2018 · 1 comment
Open

Fails to parse buffer-size when file input is used #4

kcghost opened this issue May 18, 2018 · 1 comment

Comments

@kcghost
Copy link

kcghost commented May 18, 2018

searchbin -t text -b 8388608 bigfile
works but: searchbin -f file -b 8388608 bigfile
Fails with the following error on Python 2.7.14
Traceback (most recent call last): File "/root/bin/searchbin", line 423, in <module> main() File "/root/bin/searchbin", line 402, in main args = verify_args(args) # Check arguments for sanity, and edit them a bit. File "/root/bin/searchbin", line 254, in verify_args if ar.bsize < len("?".join(ar.pattern)) * 2: UnicodeDecodeError: 'ascii' codec can't decode byte 0x9d in position 1: ordinal not in range(128)

@Sepero
Copy link
Owner

Sepero commented Aug 26, 2018

My apologies for the late reply. Try using Python3 (or use the default buffer size)? It's a problem with how Python2 reads characters. Sincerely Thank you for bringing it to my attention. I haven't had the time to fix this yet.

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

2 participants