-
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
Getting an error when my JSON items return in a list format [{},{}] #80
Comments
The current version of fuzzy-JSON can only handle JSON with data structured as dictionaries. Support for lists as root elements is under development. I will fix it soon |
Thanks for letting us know about the issue! It should be fixed in the new release. If you still have any problems after updating, just shoot us a message.
|
Hmm, i made the upgrade to 0.0.9 and still receive the same issue
It then proceeds to try and fail to repair the JSON. Any suggestions? Thank you very much for your swift responses and enhancements. |
Hello @Bright-Fox-Digital-88, Could you kindly execute It appears that the upgrade to version 0.0.9 might not have been successful, as indicated by the traceback provided:
The version referenced in the traceback is 0.0.8, not 0.0.9.
|
@Bright-Fox-Digital-88 |
attempt to uninstall both
Occasionally, pip behaves unexpectedly if you have two packages with the same module name. |
Hey there, After following the uninstall/reinstall instructions, i was still producing the error. So, I created a fresh environment with a script that made a single Open AI API call and user fuzzy-json to process it and it worked perfectly. Looks like pip was not even uninstalling properly, so i deleted all fuzzy-json/fuzy-jon files from the lib and then manually copy pasted them over from the other environment and that seems to have fixed the issue. Now it looks like Im just struggling with a little instability this morning with the Open AI API, but theres not much us mortals can do about the gods and their problems. Thank you once again for your help and the quick feature update. Much appreciated! |
I'm pleased to hear that your problem has been resolved. Wishing you a pleasant day ahead! |
Hi there!
Me again. My use case with GPT is requiring me to format the response strings as lists with embedded dictionaries. when using loads() i get an error with 2 exceptions that terminates in a failure to repair the JSON.
My response.choices[0].messages.content is as follows:
[{"title": "Whispers of the Golden Dunes"}, {"concept": "In the heart of the windswept dunes, where the golden sands stretch endlessly and the relentless ocean waves paint a mesmerizing canvas of natural beauty, lies a tale of mystery and adventure.
Our story follows a young nomad, Zephyr, who stumbles upon an ancient artifact buried in the shifting sands. This discovery sets off a chain of events that leads Zephyr on a perilous journey across the dunes, pursued by a shadowy organization intent on claiming the artifact's power for their own nefarious purposes.
As Zephyr delves deeper into the secrets of the dunes, he uncovers long-forgotten legends and encounters enigmatic guardians of the desert. His quest becomes a race against time as he strives to unlock the true potential of the artifact and prevent it from falling into the wrong hands.
"Whispers of the Golden Dunes" is a tale of courage, discovery, and the enduring spirit of the desert. It weaves a captivating narrative of adventure and intrigue against the backdrop of the windswept dunes, where the sands hold ancient secrets and the ocean whispers tales of forgotten lore."}]
Let me know what you think in this case
The text was updated successfully, but these errors were encountered: