DSOlab / autobern

Various programs and modules to assist DSO automatic GNSS processing
MIT License
5 stars 1 forks source link

bug: error at compile_report #10

Closed demanasta closed 2 years ago

demanasta commented 2 years ago

BPE Proccessing finished succesfully run -y 2018 -d 200 compile_report function produce the following error at station katc (data available for katc) and stop the output:

Traceback (most recent call last):
  File "rundd.py", line 1050, in <module>
    compile_report(options, dt, bern_log_fn, netsta_dct, station_ts_updated, rinex_holdings)
  File "rundd.py", line 669, in compile_report
    print('{:15s} {:45s} {:5s} '.format(full_name, os.path.basename(rnx_dct['remote']), str(rnx_dct['exclude'])), file=logfn, end='')
  File "/usr/lib/python3.8/posixpath.py", line 142, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
xanthospap commented 2 years ago

Reason for the bug: sometimes RINEX files are not downloaded because a copy is already available. In this case, the site's rinex_holdings['remote'] value is not a string but None. Changed that to report 'download skipped' if the RINEX was not downloaded.

Fix: rundd.py, added line: remote_rnx = os.path.basename(rnx_dct['remote']) if rnx_dct['remote'] is not None else 'download skipped'