qutip / qutip-qtrl

The QuTiP quantum optimal control package
BSD 3-Clause "New" or "Revised" License
6 stars 7 forks source link

log_handler setting was removed from qutip master? #22

Closed BoxiLi closed 2 months ago

BoxiLi commented 3 months ago

I don't fully understand why this is happening. The error emerged suddenly, it wasn't there before.

https://github.com/qutip/qutip-qip/actions/runs/9520446957/job/26247017075

tests/test_compiler.py:7: in <module>
    from qutip_qip.device import (
src/qutip_qip/device/__init__.py:13: in <module>
    from .optpulseprocessor import OptPulseProcessor
src/qutip_qip/device/optpulseprocessor.py:8: in <module>
    import qutip.control.pulseoptim as cpo
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/qutip_qtrl/pulseoptim.py:65: in <module>
    import qutip_qtrl.optimconfig as optimconfig
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/qutip_qtrl/optimconfig.py:17: in <module>
    logger = qutip_qtrl.logging_utils.get_logger("qutip.control.optimconfig")
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/qutip_qtrl/logging_utils.py:69: in get_logger
    policy = settings.log_handler
E   AttributeError: 'Settings' object has no attribute 'log_handler'. Did you mean: '_log_handler'?
BoxiLi commented 3 months ago

To reproduce, use python==3.12.3 and qutip@master

from qutip_qtrl.logging_utils import get_logger
get_logger("")
BoxiLi commented 3 months ago

It only appears for the developing qutip in the master branch...