Skip to content
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

JSONDecoder error when retrieving IQP job #1603

Closed
jyu00 opened this issue Apr 11, 2024 · 7 comments
Closed

JSONDecoder error when retrieving IQP job #1603

jyu00 opened this issue Apr 11, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@jyu00
Copy link
Collaborator

jyu00 commented Apr 11, 2024

Describe the bug

Retrieving job

image

raised a JSONDecoder error

image

Steps to reproduce

Expected behavior

Suggested solutions

Additional Information

  • qiskit-ibm-runtime version: 0.22
  • Python version: 3.10
  • Operating system:

I didn't look too much into this, but a quick Google search says it may be an incompatibility between request and Python 3.10.

@jyu00 jyu00 added the bug Something isn't working label Apr 11, 2024
@danipombo
Copy link

For context, the above error was generated when running the code on the IBM Watson Studio. However, It ran smoothly when executing in my local environment.

@pacomf
Copy link
Member

pacomf commented Apr 18, 2024

I replicated the issue in Watson Studio and I resolved uninstalling the simplejson dependency:

!yes | pip uninstall simplejson (Remember restart the kernel after uninstall in jupyter environment, in this case in Watson Studio)

For context: Qiskit/qiskit-ibm-provider#649 (comment)

@kt474
Copy link
Member

kt474 commented Apr 26, 2024

Thank you @pacomf - yes this same issue we discovered a while back in qiskit-ibm-provider.

It appears that when simplejson is in the environment requests preferentially imports it. However, the arguments accepted by JSONDecoder are inconsistent between the standard library json and simplejson leading to errors when using the standard json.JSONDecoder when simplejson is in the environment.

Closing as resolved

@kt474 kt474 closed this as completed Apr 26, 2024
@HuangJunye
Copy link
Contributor

This issue was reported during the quantum challenge when people were running the notebook on qBraid. Is there a plan to add some checks of whether simplejson exist in the environment and raise warnings? This bug is rather hard to debug unless user search on the github repo.

@rryoung98
Copy link

Thanks @HuangJunye it's certainly a non-obvious bug we'll try and fix it asap.

@JaganNatarajan
Copy link

@rryoung98 is this issue fixed. I am still seeing this happen in qBraid. Could you please update?

@kt474
Copy link
Member

kt474 commented Jul 15, 2024

Hi @JaganNatarajan I'm working on a fix in #1800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants