Closed RafaelKluender closed 2 years ago
I can't reproduce this with Windows cmd, Powershell, or Linux bash. Maybe it is something to do with how pyxform is being run. The %run
syntax looks like a notebook. Can you try the same outside of a notebook? I don't think running pyxform from a notebook is supported.
Software and hardware versions
pyxform v1.7.0, Python v3.8
When indicating a relative path for the input file (../folder1/input.xlsx) into the command:
I get the error
I am executing xls2xform.py from a python instance.
The full error message:
`--------------------------------------------------------------------------- PyXFormError Traceback (most recent call last) c:\users\kluera\anaconda3\lib\site-packages\pyxform\xls2xform.py in
191
192 if name == "main":
--> 193 main_cli()
c:\users\kluera\anaconda3\lib\site-packages\pyxform\xls2xform.py in main_cli() 168 else: 169 try: --> 170 warnings = xls2xform_convert( 171 xlsform_path=args.path_to_XLSForm, 172 xform_path=args.output_path,
c:\users\kluera\anaconda3\lib\site-packages\pyxform\xls2xform.py in xls2xform_convert(xlsform_path, xform_path, validate, pretty_print, enketo) 34 warnings = [] 35 ---> 36 json_survey = xls2json.parse_file_to_json(xlsform_path, warnings=warnings) 37 survey = builder.create_survey_element_from_dict(json_survey) 38 # Setting validate to false will cause the form not to be processed by
~\Anaconda3\envs\python38\lib\site-packages\pyxform\xls2json.py in parse_file_to_json(path, default_name, default_language, warnings, file_object) 1390 if warnings is None: 1391 warnings = [] -> 1392 workbook_dict = parse_file_to_workbook_dict(path, file_object) 1393 fallback_form_name = str(get_filename(path)) 1394 return workbook_to_json(
~\Anaconda3\envs\python38\lib\site-packages\pyxform\xls2json.py in parse_file_to_workbook_dict(path, file_object) 1361 (shortname, extension) = os.path.splitext(filename) 1362 if not extension: -> 1363 raise PyXFormError("No extension.") 1364 1365 if extension in constants.SUPPORTED_FILE_EXTENSIONS:
PyXFormError: No extension.`