Closed nonhermitian closed 2 years ago
@nonhermitian are you still having this issue? Can you paste your code - wasn't able to replicate to issue
I can recreate this issue with the following program using the main branch:
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler, Session, Options
from qiskit.test.reference_circuits import ReferenceCircuits
service = QiskitRuntimeService()
session = Session(service=service, max_time=int(2.5*60*60))
sampler = Sampler(session=session, options=Options(backend="my_backend"))
job = sampler.run(ReferenceCircuits.bell())
print(job.job_id)
session.close()
It doesn't seem consistent, though.
It looks like the queue is returning 404 if the job that created the session is still running. Opening an issue with that team.
This is fixed
Describe the bug Doing
session.close()
givesRequestsApiError: '404 Client Error: Not Found for url: https://runtime-us-east.quantum-computing.ibm.com/sessions/cbuha1tlktk3613uee3g/close. {"errors":[{"code":"not_found","message":"unknown session","more_info":"https://cloud.ibm.com/apidocs/quantum-computing#error-handling"}],"trace":"cbuha6olvap7pf91jfr0"}'
Steps to reproduce Try to close a session
Expected behavior I can close a session
Suggested solutions
Additional Information