-
Notifications
You must be signed in to change notification settings - Fork 5
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
Having an error running loads method #57
Comments
It seems I made a bad choice initially. The function fuzzy_json.loads operates similarly to json.loads, but it requires manual activation for its distinct features. To address your issue, modify the line This adjustment should resolve the problem. Regarding the data snippet you provided: I plan to make the necessary updates in the next version of the software. |
The issue has been resolved in version 0.0.8. Thank you for your report, and if you have any more questions, feel free to reach out. |
After your suggested change, i managed to produce a new error: Traceback (most recent call last): |
Before using json.loads, you must serialize the object.
|
Success! Thank you! |
Please star this GitHub repository if you feel it is useful:) |
My code:
My error:
Traceback (most recent call last): File "/Users/gordonligon/Desktop/chain-prompt/test3.py", line 8, in <module> parsed_json = loads(test) File "/Users/gordonligon/Desktop/chain-prompt/lib/python3.10/site-packages/fuzzy_json/decoder.py", line 279, in loads return json.loads(json_str, strict=False) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 359, in loads return cls(**kw).decode(s) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 743 (char 742)
I'm a pretty shit programmer, so trying to figure out where i went wrong. The test object is what i receive back from Open AI, + a little .replace to double escape the line breaks.
My tools are breaking whenever GPT decides to throw " in my text.
The text was updated successfully, but these errors were encountered: