[SUPPORT] Example command not worked
fu-hsi opened this issue · 9 comments
Hi.
I tried this command from your advice:
Hitrava.py --zip HiZip.zip --json_export
and I received usage tips:
usage: Hitrava.py [-h] [-z ZIP] [-j JSON] [--json_export] [-f FILE] [-s {Walk,Run,Cycle,Swim_Pool,Swim_Open_Water}]
[-t TAR] [--from_date FROM_DATE] [--pool_length POOL_LENGTH] [--tcx_insert_altitude_data]
[--output_dir OUTPUT_DIR] [--use_original_filename] [--output_file_prefix OUTPUT_FILE_PREFIX]
[--suppress_output_file_sequence] [--validate_xml] [--log_level {INFO,DEBUG}]
Any suggestions? What arguments are required? Why it is not worked?
I have "Motion path detail data & description\motion path detail data.json" file in zip package.
The help information is displayed when you start the script without parameters or with the -h or --help parameters.
Could you give some more info how you executed this command? Do you have this command in a batch file or did you type it on the command prompt? Most likely in some way the script was started without any parameter.
If the program is run with any parameter different than -h or --help you should see similar logging messages like below.
INFO - main - Hitrava version 3.6.1 (build 2009.1901) started with arguments ['--zip', 'HiZip.zip', '--json_export']
INFO - main - Running on Python version 3.8.5
I started command from bat file and from windows console (cmd).
After execute command new window appears...
Now I'm writing my own script in PHP, maybe I'll do it faster than I run a python script ;)
Do I understand correct that you got it working? If so, feel free to close the issue, If not, let me know.
No, it doesn't work for me, but I writing my own script.
Strange. I'd be happy to help to sort it out though.
By any chance, is there anything below the usage information? If so, it would state an unrecognized arguments message.
E.g. when you run the next command with an invalid parameter INVALID
Hitrava.py INVALID
You would get the following output.
usage: Hitrava.py [-h] [-z ZIP] [-j JSON] [--json_export] [-f FILE] [-s {Walk,Run,Cycle,Swim_Pool,Swim_Open_Water}]
[-t TAR] [--from_date FROM_DATE] [--pool_length POOL_LENGTH] [--tcx_insert_altitude_data]
[--output_dir OUTPUT_DIR] [--use_original_filename] [--output_file_prefix OUTPUT_FILE_PREFIX]
[--suppress_output_file_sequence] [--validate_xml] [--log_level {INFO,DEBUG}]
Hitrava.py: error: unrecognized arguments: INVALID
Notice the last line in the output. If this is the case in your situation, you could recheck your command for any typing error.
I'm assuming that you are using a recent python version. You can check with the following command
python --version
After launch Run_Hitrava.cmd:
https://photos.app.goo.gl/Jp47TqQrZtpj5XEh8
I have HiZip.zip in the same directory.
"Press enter to exit." without any error message...
I suspect it must have something to do with the 'Python Windows App' that you probably installed from the Windows Store. It looks like it doesn't take the command line parameters and just plainly executes the script without parameters.
I am not familiar with that Windows app at all. I suggest to install the regular python interpreter as explained in the installation procedure in the README file here.
Yes, a quick StackOverflow search reveals that the WindowsApp doesn't take in parameters just like that.
It will be easier to use the suggested install procedure, I think.
For more info on the WindowsApp, look here on StackOverflow for more info.
Ah, OK :)
I already thought that I do not understand the simple thing...
Thanks.