Project

Profile

Help

Bug #6143

closed

White space in file path causing an error

Added by Pierre Dostie 10 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Low
Category:
Python API
Start date:
2023-07-28
Due date:
% Done:

100%

Estimated time:
Found in version:
12.3.0
Fixed in version:
12.4
Platforms:

Description

Hi,

I was using Saxonche version 12.0.0 and was able to perform the following without any issue in Python:

fileout = os.path.join(folder,define)

proc_define = PySaxonProcessor(license=False) xsltproc_define = proc_define.new_xslt30_processor() executable = xsltproc_define.compile_stylesheet(stylesheet_file=xls2xml_stylesheet) node = proc_define.parse_xml(xml_text=file_xml) executable.transform_to_file(output_file=fileout, xdm_node= node)

Variable fileout is a file path that contains 1 or more white spaces (i.e. C:/Users/OneDrive - XXX/Documents/test.xml)

It used to work just fine with 12.0.0 but since I upgraded to 12.3.0, I get the following error:

saxonche.PySaxonApiError: Illegal character in path at index xx: C:/Users/OneDrive - XXX/Documents/test.xml

It seems the "transform_to_file" no longer accepts output_file parameter value with white spaces.

Please register to edit this issue

Also available in: Atom PDF