frbcat icon indicating copy to clipboard operation
frbcat copied to clipboard

TNS: 'host_redshift' not found in columns

Open 0xCoto opened this issue 3 years ago • 4 comments

@loostrum - Any idea why that is?

Traceback (most recent call last):
  File "/home/runner/work/FRBSTATS/FRBSTATS/FRBSTATS/tns_compare.py", line 56, in <module>
    tns = TNS(path='/home/runner/', tns_name='my_user_name', tns_id='my_user_id')
  File "/usr/local/lib/python3.10/dist-packages/frbcat/tns.py", line 54, in __init__
    self.get_data()
  File "/usr/local/lib/python3.10/dist-packages/frbcat/tns.py", line 127, in get_data
    self.clean_df(df)
  File "/usr/local/lib/python3.10/dist-packages/frbcat/tns.py", line 308, in clean_df
    df = df.astype({'tns_id': int,
  File "/usr/local/lib/python3.10/dist-packages/pandas/core/generic.py", line 6212, in astype
    raise KeyError(
KeyError: "Only a column name can be used for the key in a dtype mappings argument. 'host_redshift' not found in columns."

Not sure if something suddenly changed in the TNS (has been working fine so far).

Thanks!

0xCoto avatar Jan 04 '23 14:01 0xCoto

@davidgardenier @fjankowsk @andrewzwaniga looping you guys in, in case you happen to know if something might have changed with the TNS recently.

0xCoto avatar Jan 08 '23 15:01 0xCoto

Hi,

I ran into this issue too recently. Have you or anyone else found a fix for it in the meantime? It would be nice to get this fixed.

Cheers. Fabian

fjankowsk avatar Feb 02 '23 10:02 fjankowsk

@fjankowsk Try this fork: https://github.com/HeRTA/frbcat

Haven't submitted a PR because it may break other things that require these parameters, but it works for me considering I don't need access to such data.

0xCoto avatar Feb 02 '23 11:02 0xCoto

@loostrum You're probs best placed to look into this, but see how it fits in your schedule.

davidgardenier avatar Feb 02 '23 14:02 davidgardenier