-
Notifications
You must be signed in to change notification settings - Fork 563
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
Fix TypeError in VBA_Parser.analyze_macros() (can't concat bytes to s… #429
Fix TypeError in VBA_Parser.analyze_macros() (can't concat bytes to s… #429
Conversation
OK thanks, I need to check that more in details. In the new version 0.54, we should return str depending on the Python version: bytes on Py2, unicode on Py3. The problem is, the codec should not be UTF-8, but based on the code page of the VBA project. Which we don't have in this case... |
OK, I'm aware that this is just a hotfix for my needs (Py3). Hope this will be fixed properly in the next version :) |
I might use chardet in this case when we don't have the code page: https://github.com/chardet/chardet |
79cddcd
to
2a92116
Compare
…tr). Similar to PR decalage2#288. `decompress_stream()` yields bytes but vba_code value returned from `extract_macros()` should be AFAIK string in Python 3.
2a92116
to
3e9d763
Compare
I've changed the PR implementation to use chardet :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it with a slightly different solution, see #455.
…tr).
Similar to PR #288.
decompress_stream()
yields bytes butvba_code
value returned fromextract_macros()
should be AFAIK string (at least all otheryield
s returnstring.
Sample that failed: 871beebb71290d040584fa7587c608b50e0d42e0f7657e10946de640ee4c3f1b