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
logging.info("Unable to import google auth packages")
(and perhaps others elsewhere) are invoked during the import step. This is often too early for handlers to be added to the root logger, in which case the Python logging library calls logging.basicConfig(). This adds a default StreamHandler that processes all logging messages to stderr in addition to any other handlers that the user adds later. Typically, the end result for any user that adds their own StreamHandler is that log messages are emitted twice - once to stdout and once to stderr.
This is similar to issues described here and here.
Example
This example was taken from the SO link above and modified slightly to show the problem using h5pyd.
The
logging.info
calls added recently hereh5pyd/h5pyd/_hl/openid.py
Line 14 in ca1f8ae
and here
h5pyd/h5pyd/_hl/openid.py
Line 23 in ca1f8ae
(and perhaps others elsewhere) are invoked during the import step. This is often too early for handlers to be added to the root logger, in which case the Python logging library calls
logging.basicConfig()
. This adds a default StreamHandler that processes all logging messages to stderr in addition to any other handlers that the user adds later. Typically, the end result for any user that adds their ownStreamHandler
is that log messages are emitted twice - once tostdout
and once tostderr
.This is similar to issues described here and here.
Example
This example was taken from the SO link above and modified slightly to show the problem using
h5pyd
.test.py
A clean install (i.e. new conda environment +
pip install h5pyd
) gives the following output when running the file above:Instead, the expected output (which can be achieved by removing the
import h5pyd
line above) is:Interestingly, the missing import messages are not actually recorded. Not sure why that is the case.
Any support with this issue would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: