We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b961ce commit e4454d4Copy full SHA for e4454d4
src/sindri/sindri.py
@@ -406,10 +406,11 @@ def create_circuit(
406
# Create a tar archive and upload via byte stream
407
circuit_upload_path = os.path.abspath(circuit_upload_path)
408
file_name = f"{pathlib.Path(circuit_upload_path).stem}.tar.gz"
409
- fh = io.BytesIO()
410
- with tarfile.open(fileobj=fh, mode="w:gz") as tar:
411
- tar.add(circuit_upload_path, arcname=file_name)
412
- files = {"files": fh.getvalue()} # type: ignore
+ with open(file_name, "wb") as fh:
+ with tarfile.open(fileobj=fh, mode="w:gz") as tar:
+ tar.add(circuit_upload_path, arcname=file_name)
+ fh = open(file_name, "rb")
413
+ files = {"files": fh}
414
415
data = {
416
"tags": tags,
0 commit comments