Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## v0.9.1

* (Bug fix) Retries in POST/PUTs to REST APIs didn't happen.
* Warn users if `allow_pickle=True` is required.

## v0.9.0

* Set status to `failed` or `terminated` if the context manager is used and there is an exception.
Expand Down
2 changes: 2 additions & 0 deletions simvue/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def post(url, headers, data, is_json=True):
data = json.dumps(data)
headers = set_json_header(headers)
response = requests.post(url, headers=headers, data=data, timeout=DEFAULT_API_TIMEOUT)
response.raise_for_status()

return response

Expand All @@ -41,5 +42,6 @@ def put(url, headers, data, is_json=True, timeout=DEFAULT_API_TIMEOUT):
data = json.dumps(data)
headers = set_json_header(headers)
response = requests.put(url, headers=headers, data=data, timeout=timeout)
response.raise_for_status()

return response
2 changes: 2 additions & 0 deletions simvue/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ def save(self, filename, category, filetype=None, preserve_path=False, name=None

if not is_file:
data['pickled'], data['type'] = Serializer().serialize(filename, allow_pickle)
if not data['type'] and not allow_pickle:
self._error('Unable to save Python object, set allow_pickle to True')
data['checksum'] = calculate_sha256(data['pickled'], False)
data['originalPath'] = ''
data['size'] = sys.getsizeof(data['pickled'])
Expand Down