Open cmccully opened 2 months ago
Noticed this error during logging. Might be related:
2024-08-16 14:06:55.183 WARNING: log: --- Logging error ---
2024-08-16 14:06:55.686 WARNING: log: Traceback (most recent call last):
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/logging/init.py", line 1100, in emit
msg = self.format(record)
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/logging/init.py", line 943, in format
return fmt.format(record)
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/lcogt_logging/lcogt_formatter.py", line 45, in format
json.dumps(tags)
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
2024-08-16 14:06:55.687 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
2024-08-16 14:06:55.687 WARNING: log: TypeError: Object of type datetime is not JSON serializable
2024-08-16 14:06:55.687 WARNING: log: Call stack:
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/bin/celery", line 8, in
It appears warnings.warn warnings are showing up correctly. Checking the highlighted frame in my tests showed that WCSERR=4 so https://github.com/LCOGT/banzai/blob/main/banzai/photometry.py#L300 should have printed a log message but it does not exist.