Fix for error "Unsupported PyUnicodeObject kind: 0"
When I tried to get a backtrace of my script, i got the error Unsupported PyUnicodeObject kind: 0
I delegated the fix to Codex CLI, it produced this patch, which allow me to get a python backtrace.
I did not reviewed the fix, I'm opening this PR if the author is interested in the fix itself, or for users if the bug is blocking them, this patch could help.
Feel free to close this PR.
Hey, @Kuinox! Which CPython version and OS/CPU platform are you using? Could you please share a script that reproduces the problem? Thank you!
Ah yes sorry.
This is was on python 3.10, windows 11, x86_64.
I'll try to make a reproducible script.
I do have a coredump to reproduce on my end but I cant share it.
Thank you! I have not tried running this code on Windows, so it's very likely that it never worked, indeed. I was just surprised to see that you had to implement support for "legacy" strings in the PR (which should be long gone?).
I would like to fix the tests on the main branch first and return to this a bit later. Thanks for flagging the issue!
I did try to reproduce it yesterday, but I couldn't.
The dump python bt show it's in botocore, it happened when running the paginator on an S3 bucket with a prefix, but I didn't manage to reproduce it.
I think somewhere a native deps produce this string.
OTOH, if you need me to extract info from the dump, I can do it.
@Kuinox Could you please try if the version from https://github.com/malor/cpython-lldb/pull/79 fixes your issue?
It fails with
error: Failed to execute command `py-bt`: <built-in function SBProcess_ReadMemory> returned a result with an exception set
Hmm, interesting... All the tests pass on Linux with different CPython versions. I'll see if I can get it running on Windows.
You need a lib that create theses old string, personally it was a dump in middle of boto3 listing files on S3.
If you need anything tell me.