Skip to content

Commit fcd1845

Browse files
committed
fix: logic in path_utilities.py that doesn't treat Path objects correctly
1 parent 0cb5abb commit fcd1845

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/08-python-operators/02-python_operators_with_dependencies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
)
189189

190190
dpf.load_library(
191-
dpf.path_utilities.join(tmp, "plugins", "gltf_plugin"),
191+
dpf.path_utilities.join(str(tmp), "plugins", "gltf_plugin"),
192192
"py_dpf_gltf",
193193
"load_operators",
194194
)
@@ -244,7 +244,7 @@
244244

245245
print("operator ran successfully")
246246

247-
dpf.download_file(tmp / "out.glb", Path.cwd / "out.glb")
247+
dpf.download_file(tmp / "out.glb", Path.cwd() / "out.glb")
248248

249249
# %%
250250
# You can download :download:`output <images/thumb/out.glb>` from the ``gltf`` operator.

src/ansys/dpf/core/path_utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def join(*args, **kwargs):
6161
server = None
6262
parts = []
6363
for a in args:
64-
if isinstance(a, (str, Path)) and len(a) > 0:
64+
if isinstance(a, (str, Path)) and len(str(a)) > 0:
6565
parts.append(str(a))
6666
elif isinstance(a, ansys.dpf.core.server_types.LegacyGrpcServer):
6767
server = a

0 commit comments

Comments
 (0)