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
Running playwright tasks inside faust stream process (faust-streaming = "^0.10.11"), I got an exception. It errors out on sys.stderr.fileno() line with raise NotImplementedError() error.
try:
# when using pythonw, sys.stderr is None.# when Pyinstaller is used, there is no closed attribute because Pyinstaller monkey-patches it with a NullWriter classifsys.stderrisNoneornothasattr(sys.stderr, "closed"):
returnNoneifsys.stderr.closed:
returnNone----->returnsys.stderr.fileno()
except (AttributeError, io.UnsupportedOperation):
# pytest-xdist monkeypatches sys.stderr with an object that is not an actual file.# https://docs.python.org/3/library/faulthandler.html#issue-with-file-descriptors# This is potentially dangerous, but the best we can do.ifnothasattr(sys, "__stderr__") ornotsys.__stderr__:
returnNonereturnsys.__stderr__.fileno()
Expected
Adding NotImplementedError also to the exception block resolves this issue. And handles case where fileno() is not implemented. I'm not sure why it's the case when using faust though. But covering this exception, runs playwright service just fine and good
System info
Actual
Related to #246
Running playwright tasks inside faust stream process (faust-streaming = "^0.10.11"), I got an exception. It errors out on
sys.stderr.fileno()
line withraise NotImplementedError()
error.Expected
Adding
NotImplementedError
also to the exception block resolves this issue. And handles case wherefileno()
is not implemented. I'm not sure why it's the case when using faust though. But covering this exception, runs playwright service just fine and goodThe text was updated successfully, but these errors were encountered: