Describe the bug
I am unable to upload a .3mf file to my Bambu Cloud account. I am using the "Complete Upload and Print Workflow" script found in the files and printing documentation with some extra print statements added in. While I technically get a status code 200 response that includes an AWS url, the file never actually shows up in my account when running client.get_cloud_files(). The only files that this function returns are those which I've uploaded by sending them through Bambu Studio. I also cannot use client.start_cloud_print to print anything without getting a "bambulab.client.BambuAPIError: API request failed (405):" error, including files I've uploaded through Bambu Studio.
To Reproduce
Run the script below with your information added in the "YOUR_TOKEN_HERE" and "YOUR_PRINTER_SERIAL_HERE" fields.
Expected behavior
I expected my Test.3mf file to be uploaded and printed, neither of which actually happened.
Code snippet
client = BambuClient(token="YOUR_TOKEN_HERE")
devices = client.get_devices()
for device in devices:
print(f"{device['name']}: {device['print_status']}")
print(device)
model_name = "Test.3mf"
# Step 1: Upload file
print("Uploading file...")
result = client.upload_file(model_name)
print(result)
if result['status_code'] in [200, 201, 204]:
print(f"Upload successful: {result['filename']}")
# Step 2: Wait for file to register
time.sleep(2)
# Step 3: List files to verify
files = client.get_cloud_files()
print(f"Found {len(files)} files in cloud")
print(files)
# Step 4: Start print
print_result = client.start_cloud_print(
device_id="YOUR_PRINTER_SERIAL_HERE",
filename=model_name
)
print(f"Print started! Job ID: {print_result.get('job_id')}")
Error message
Traceback (most recent call last):
File "...\example_cloud.py", line 29, in <module>
print_result = client.start_cloud_print(
device_id="YOUR_PRINTER_SERIAL_HERE",
filename=model_name
)
File "...\bambulab\client.py", line 323, in start_cloud_print
return self.start_print_job(
~~~~~~~~~~~~~~~~~~~~^
device_id=device_id,
^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
settings=settings
^^^^^^^^^^^^^^^^^
)
^
File "...\bambulab\client.py", line 277, in start_print_job
return self.post('v1/iot-service/api/user/print', data=data)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\bambulab\client.py", line 110, in post
return self._request('POST', endpoint, data=data, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\bambulab\client.py", line 92, in _request
raise BambuAPIError(
f"API request failed ({response.status_code}): {error_msg}"
)
bambulab.client.BambuAPIError: API request failed (405):
Environment:
- OS: Windows 11
- Python version: 3.13.7
- Library version: V1.0.5
- Printer model: P1S
Describe the bug
I am unable to upload a .3mf file to my Bambu Cloud account. I am using the "Complete Upload and Print Workflow" script found in the files and printing documentation with some extra print statements added in. While I technically get a status code 200 response that includes an AWS url, the file never actually shows up in my account when running client.get_cloud_files(). The only files that this function returns are those which I've uploaded by sending them through Bambu Studio. I also cannot use client.start_cloud_print to print anything without getting a "bambulab.client.BambuAPIError: API request failed (405):" error, including files I've uploaded through Bambu Studio.
To Reproduce
Run the script below with your information added in the "YOUR_TOKEN_HERE" and "YOUR_PRINTER_SERIAL_HERE" fields.
Expected behavior
I expected my Test.3mf file to be uploaded and printed, neither of which actually happened.
Code snippet
Error message
Environment: