-
Notifications
You must be signed in to change notification settings - Fork 10
Description
When attempting to upload an attachment for a specific record using upload_attachment(), the following exception is raised:
Exception Traceback (most recent call last)
Cell In[54], line 15
temp_path = Path("downloaded_attachment.jpeg")
temp_path.write_bytes(response.content)
---> record.upload_attachment(field='attach', filepath=Path(temp_path), mimetype='image/jpeg')
File c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\nocodb\Record.py, line 110, in upload_attachment
value = self.get_value(field=field) or []
value.append(self.noco_db.upload_file(filepath=filepath, mimetype=mimetype))
--> return self.update(**{field: value})
File c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\nocodb\Record.py, line 96, in update
kwargs["Id"] = self.record_id
--> r = self.noco_db.call_noco(
path=f"tables/{self.table.table_id}/records",
method="PATCH",
json=kwargs,
)
return self.table.get_record(record_id=r.json()["Id"])
File c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\nocodb_init_.py, line 49, in call_noco
_logger.debug(r.status_code)
if r.status_code >= 400:
--> raise Exception(f"Server response: {r.status_code} - {r.text}")
if r.status_code != 200:
_logger.warning(r.text)
Exception: Server response: 400 - {"msg":"Column "Id" is system column and cannot be updated"}