IMAP-Science-Operations-Center / imap-data-access

Package to download, query, and upload files from the IMAP Science Data Center.
MIT License
0 stars 7 forks source link

BUG - Output table not working #29

Closed maxinelasp closed 2 months ago

maxinelasp commented 2 months ago

Description of the issue

When running query, the output table does not work. The --output-format json option still works.

Steps to reproduce the issue

imap-data-access query --instrument mag --data-level l0

Code Snippet:

❯ imap-data-access query --instrument mag --data-level l0
Found [4] matching files
---------------------------------------------------------------------------------------------------------------|
Instrument|Data Level|Descriptor|Start Date|Repointing|Version|Filename                                          |
---------------------------------------------------------------------------------------------------------------|
Traceback (most recent call last):
  File "/Users/maha7656/Documents/code/imap/venv/bin/imap-data-access", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/maha7656/Documents/code/imap/venv/lib/python3.11/site-packages/imap_data_access/cli.py", line 292, in main
    args.func(args)
  File "/Users/maha7656/Documents/code/imap/venv/lib/python3.11/site-packages/imap_data_access/cli.py", line 114, in _query_parser
    _print_query_results_table(query_results)
  File "/Users/maha7656/Documents/code/imap/venv/lib/python3.11/site-packages/imap_data_access/cli.py", line 79, in _print_query_results_table
    print(format_string.format(*values))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unsupported format string passed to NoneType.__format__

Expected behavior (What should happen)

Print table

Actual behavior (What does happen)

Error

Additional notes

No response

Affected areas (code, data, or process)

No response

Suggested fix?

No response

greglucas commented 2 months ago

This was fixed by https://github.com/IMAP-Science-Operations-Center/imap-data-access/pull/27 and just hasn't been released yet. I'll try and push out another release soon with some other items as well. But this does work if you use main currently.

maxinelasp commented 2 months ago

@greglucas Ah, my bad, I didn't connect that with the other ticket! It would be great to release this soon, MAG asked about using it

greglucas commented 2 months ago

No problem at all! OK, maybe we can just make another release after your other update is fixed (PR incoming).