You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from loguru._handler import StrRecord ImportError: cannot import name 'StrRecord' from 'loguru._handler' (/python3.7/site-packages/loguru/_handler.py)
#1103
Open
saba-nazir opened this issue
Mar 16, 2024
· 1 comment
I am trying to use an older version of loguru i.e. loguru==0.5.3 but getting the following error.
from loguru._handler import StrRecord
ImportError: cannot import name 'StrRecord' from 'loguru._handler' (/DCASE/dcase-2020-baseline-master/dcase_env/lib/python3.7/site-packages/loguru/_handler.py)
Please help.
The text was updated successfully, but these errors were encountered:
The StrRecord class is an internal type that should not be imported.
If your intention was to use type hints, you should instead use the Message type to annotate your functions. This type is not defined at run-time, it only exists for type checkers, so make sure to follow the steps explained in the documentation: Type hints.
from __future__ importannotationsimportlogurudefmy_sink(message: loguru.Message):
...
I am trying to use an older version of loguru i.e. loguru==0.5.3 but getting the following error.
from loguru._handler import StrRecord
ImportError: cannot import name 'StrRecord' from 'loguru._handler' (/DCASE/dcase-2020-baseline-master/dcase_env/lib/python3.7/site-packages/loguru/_handler.py)
Please help.
The text was updated successfully, but these errors were encountered: