You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for an opened issue and didn't find my bug
I confirm I didn't find any issue regarding my bug
Version of Kosmorro
0.10
Version of Python
3.10
Operating system
Linux
Installation source
PyPI
Bug description
When launching with kosmorro --output=ephemeride.pdf, kosmorro crashes with the following trace:
Traceback (most recent call last):
File "/home/arnaud/.local/bin/kosmorro", line 8, in <module>
sys.exit(main())
File "/home/arnaud/.local/lib/python3.10/site-packages/kosmorro/__main__.py", line 316, in main
sys.exit(run())
File "/home/arnaud/.local/lib/python3.10/site-packages/kosmorro/__main__.py", line 107, in run
output_file.write(pdf_content)
TypeError: a bytes-like object is required, not 'str'
I would expect an error for missing/wrong parameters instead of a crash.
Alternatively, kosmorro could guess the desired output based on the extension of the output argument, and inform the user that this decision has been made.
Also, kosmorro --format=json --output=ephemeride.json and kosmorro --format=text --output="ephemeride.txt" crash with similar errors.
Here the expected behavior would be to write a file with the json or text output.
Alternatively kosmorro could ignore the parameter and warn the user about it.
For comparison, the following commands works fine:
Alternatively, kosmorro could guess the desired output based on the extension of the output argument, and inform the user that this decision has been made.
This is already implemented and will be available in v1.0 (#197) :)
Thanks for the bug report, I'll check what's happening there
After some testing, it looks like the issue described here does not happen in the development branch for v1.0, so I don't think it's worth a fix for v0.10.
As a workaround, you may redirect the output with the shell:
I have searched for an opened issue and didn't find my bug
Version of Kosmorro
0.10
Version of Python
3.10
Operating system
Linux
Installation source
PyPI
Bug description
When launching with
kosmorro --output=ephemeride.pdf
, kosmorro crashes with the following trace:I would expect an error for missing/wrong parameters instead of a crash.
Alternatively, kosmorro could guess the desired output based on the extension of the output argument, and inform the user that this decision has been made.
Also,
kosmorro --format=json --output=ephemeride.json
andkosmorro --format=text --output="ephemeride.txt"
crash with similar errors.Here the expected behavior would be to write a file with the json or text output.
Alternatively kosmorro could ignore the parameter and warn the user about it.
For comparison, the following commands works fine:
The text was updated successfully, but these errors were encountered: