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
that silently causes ALL warnings ever, globally, to be supressed after this line. Probably there's a warnings.simplefilter("ignore") line in WPG somewhere. In fact, it's more severe: anything that imports wpg or (probably) any part of it is affected.
This sounds like a serious unintended side effect. It will happen to anything that imports SimEx.Utilities.IOUtilities, and anything that imports the code that imports it, and so on.
If WPG is not under our control, a possible fix would be to add warnings.simplefilter("ignore") after every place in SimEx WPG is imported. This may also cause troubles however, as it also overrides any intentional warnings filter applied beforehand.
MRE of bug and fix:
importwarningswarnings.warn("First warning before import")
importwpg# from wpg.converters.genesis_v2 import read_genesis_file as genesis2 # causes the same behaviour# from SimEx.Utilities.IOUtilities import loadPDB # causes the same behaviourwarnings.warn("Second warning after import")
warnings.simplefilter("default")
warnings.warn("Third warning after filter reset")
This will print
pdb_wtf.py:2: UserWarning: First warning before import
warnings.warn("First warning before import")
initializing ocelot...
pdb_wtf.py:9: UserWarning: Third warning after filter reset
warnings.warn("Third warning after filter reset")
The text was updated successfully, but these errors were encountered:
In
SimEx.Utilities.IOUtilities
, there's an importthat silently causes ALL warnings ever, globally, to be supressed after this line. Probably there's a warnings.simplefilter("ignore") line in WPG somewhere. In fact, it's more severe: anything that imports
wpg
or (probably) any part of it is affected.This sounds like a serious unintended side effect. It will happen to anything that imports SimEx.Utilities.IOUtilities, and anything that imports the code that imports it, and so on.
If WPG is not under our control, a possible fix would be to add
warnings.simplefilter("ignore")
after every place in SimEx WPG is imported. This may also cause troubles however, as it also overrides any intentional warnings filter applied beforehand.MRE of bug and fix:
This will print
The text was updated successfully, but these errors were encountered: