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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.9.12 (2025-07-07)

- Support an optional bodyId parameter when downloading environment.

## 0.9.11 (2025-07-04)

- Re-generate graph client.
Expand Down
8 changes: 4 additions & 4 deletions python/mujinwebstackclient/uriutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _Unquote(primaryKey):
return _EnsureUnicode(unquote(primaryKey))


def _Quote(primaryKey):
def Quote(primaryKey):
assert isinstance(primaryKey, six.text_type)
return _EnsureUTF8(quote(_EnsureUTF8(primaryKey), safe=''))

Expand Down Expand Up @@ -497,12 +497,12 @@ def _InitFromPartType(self, partType):
self._fragment = _EnsureUnicode(partTypeSegments[1])
else:
basePartType = partType
self._primaryKey = _Quote(basePartType + self._suffix)
self._primaryKey = Quote(basePartType + self._suffix)

def _InitFromFilename(self, filename):
if self._mujinPath and filename.startswith(self._mujinPath):
filename = filename[len(self._mujinPath) :]
self._primaryKey = _Quote(filename)
self._primaryKey = Quote(filename)

@property
def scheme(self):
Expand Down Expand Up @@ -598,7 +598,7 @@ def environmentId(self):

@environmentId.setter
def environmentId(self, value):
self._primaryKey = _Quote(_EnsureUnicode(value) + self._suffix)
self._primaryKey = Quote(_EnsureUnicode(value) + self._suffix)

@property
def filename(self):
Expand Down
2 changes: 1 addition & 1 deletion python/mujinwebstackclient/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.9.11'
__version__ = '0.9.12'

# Do not forget to update CHANGELOG.md
1 change: 1 addition & 0 deletions python/mujinwebstackclient/webstackclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ def DownloadFile(self, filename, ifmodifiedsince=None, resolveReferences=False,
params = {
'resolveReferences': 'true' if resolveReferences else 'false',
}
filename = uriutils.Quote(filename) # quote '#bodyId' into '%23bodyId'
response = self._webclient.Request('GET', '/u/%s/%s' % (self.controllerusername, filename), params=params, headers=headers, stream=True, timeout=timeout)
if ifmodifiedsince and response.status_code == 304:
return response
Expand Down