Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging.warning does not appear to be working #393

Open
cmccully opened this issue Aug 16, 2024 · 1 comment
Open

logging.warning does not appear to be working #393

cmccully opened this issue Aug 16, 2024 · 1 comment

Comments

@cmccully
Copy link
Collaborator

Screenshot 2024-08-16 at 9 51 02 AM
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.

@cmccully cmccully changed the title logging.warning do not appear to be working logging.warning does not appear to be working Aug 16, 2024
@cmccully
Copy link
Collaborator Author

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
sys.exit(main())
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/main.py", line 15, in main
sys.exit(_main())
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/bin/celery.py", line 236, in main
return celery(auto_envvar_prefix="CELERY")
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/bin/base.py", line 135, in caller
return f(ctx, *args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/bin/worker.py", line 356, in worker
worker.start()
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/worker/worker.py", line 202, in start
self.blueprint.start(self)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/bootsteps.py", line 365, in start
return self.obj.start()
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/concurrency/base.py", line 130, in start
self.on_start()
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/concurrency/prefork.py", line 109, in on_start
P = self._pool = Pool(processes=self.limit,
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/concurrency/asynpool.py", line 464, in init
super().init(processes, *args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/pool.py", line 1045, in init
self._create_worker_process(i)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/concurrency/asynpool.py", line 482, in _create_worker_process
return super()._create_worker_process(i)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/pool.py", line 1157, in _create_worker_process
w.start()
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/process.py", line 120, in start
self._popen = self._Popen(self)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/context.py", line 331, in _Popen
return Popen(process_obj)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/popen_fork.py", line 22, in init
self._launch(process_obj)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/popen_fork.py", line 77, in _launch
code = process_obj._bootstrap()
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/process.py", line 323, in _bootstrap
self.run()
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/process.py", line 110, in run
self._target(*self._args, **self._kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/pool.py", line 291, in call
sys.exit(self.workloop(pid=pid))
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/billiard/pool.py", line 361, in workloop
result = (True, prepare_result(fun(*args, **kwargs)))
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/app/trace.py", line 651, in fast_trace_task
R, I, T, Rstr = tasks[task].trace(
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/app/trace.py", line 453, in trace_task
R = retval = fun(*args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/celery/app/trace.py", line 736, in protected_call
return self.run(*args, **kwargs)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/banzai/celery.py", line 166, in stack_calibrations
calibrations.make_master_calibrations(instrument, frame_type, min_date, max_date, runtime_context)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/banzai/calibrations.py", line 193, in make_master_calibrations
stage_utils.run_pipeline_stages(calibration_frames_info, runtime_context, calibration_maker=True)
2024-08-16 14:06:55.689 WARNING: log: File "/home/archive/envs/banzai/lib/python3.10/site-packages/banzai/utils/stage_utils.py", line 60, in run_pipeline_stages
logger.error('Reduction stopped', extra_tags={'filename': image_paths})
2024-08-16 14:06:55.689 WARNING: log: Message: 'Reduction stopped'
Arguments: ()
2024-08-16 14:06:55.689 INFO: calibrations: Finished | {"processName": "ForkPoolWorker-1"}
2024-08-16 14:06:55.689 INFO: trace: Task celery.stack_calibrations[c8ea36d7-c105-46b8-ab0b-c7f3a51cca09] succeeded in 14.61367720097769s: None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant