Skip to content

Commit 9335efb

Browse files
committed
BUG: revert casting of wrapped_file.name to string (#1544)
1 parent fdbec73 commit 9335efb

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/xtgeo/xyz/_xyz_io.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -405,35 +405,32 @@ def to_file(
405405
# NB! reuse export_rms_attr function, but no attributes
406406
# are possible
407407
ncount = export_rms_attr(
408-
xyz, str(wrapped_file.name), attributes=False, pfilter=pfilter
408+
xyz, wrapped_file.name, attributes=False, pfilter=pfilter
409409
)
410410

411411
elif fformat in FileFormat.RMS_ATTR.value:
412412
ncount = export_rms_attr(
413-
xyz,
414-
str(wrapped_file.name),
415-
attributes=attributes,
416-
pfilter=pfilter,
413+
xyz, wrapped_file.name, attributes=attributes, pfilter=pfilter
417414
)
418415
elif fformat in FileFormat.CSV.value:
419416
ncount = export_table(
420417
xyz,
421-
str(wrapped_file.name),
418+
wrapped_file.name,
422419
attributes=attributes,
423420
pfilter=pfilter,
424421
file_format="csv",
425422
)
426423
elif fformat in FileFormat.PARQUET.value:
427424
ncount = export_table(
428425
xyz,
429-
str(wrapped_file.name),
426+
wrapped_file.name,
430427
attributes=attributes,
431428
pfilter=pfilter,
432429
file_format="parquet",
433430
)
434431
elif fformat == "rms_wellpicks":
435432
ncount = export_rms_wpicks(
436-
xyz, str(wrapped_file.name), hcolumn, wcolumn, mdcolumn=mdcolumn
433+
xyz, wrapped_file.name, hcolumn, wcolumn, mdcolumn=mdcolumn
437434
)
438435
else:
439436
extensions = FileFormat.extensions_string(

0 commit comments

Comments
 (0)