-
Notifications
You must be signed in to change notification settings - Fork 1
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
new 2.4.0 breaks Prefixed(uint16, 'utf8') #18
Comments
After more analysis, it seems worse: when no struct is specified, the encoding doesn't seem applied: it returns a |
Hey @Niluge-KiWi, thanks for reporting this - I will get back to this issue in a few days. |
Hi again, here are some points regarding the issue you've found linked to the
I know documentation of this library is lacking content - trying my best to fill all missing spots. |
Tracking documentation related stuff in #20 for now. |
- 2.4.0 was broken, cf MatrixEditor/caterpillar#18 but it was fixed in 2.4.1, cf MatrixEditor/caterpillar#19 - pin to 2.4.1 tag to avoid future breakages - still from git as they still don't publish (too close to cpython exact version it seems) - fix breaking changes - documented: FormatField -> PyStructFormattedField - undocumented: Prefixed(uint16, 'utf8') -> Prefixed(uint16, encoding='utf8') (cf MatrixEditor/caterpillar#18)
Hello @MatrixEditor ,
Overall, thanks for the work on the project, it helped me a lot even with the current state of the documentation! |
Scenario: Field
Prefixed(uint16, 'utf8')
caterpillar.exception.StructException: 'str' object has no attribute '__unpack__'
It may come from #17, the changelog doesn't explicitly document this breaking change:
Prefixed now supports arbitrary structs
The fix:
Prefixed(uint16, encoding='utf8')
: indeed'utf8'
was now accidentally used asstruct
, not asencoding
.Maybe this change in the PR examples/ is broken too : https://github.com/MatrixEditor/caterpillar/pull/17/files#diff-8f2f4f0eab2df6f648de905b4f6e80be48cd664dc2a7e8651a514dabd155d8c4L88
maybe it should be
Prefixed(vint, encoding="utf-8")
?For a data point, what I was expecting as a user:
Anyway, thank you for this great library!
The text was updated successfully, but these errors were encountered: