-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging issue in jupyter kernel when logs are issued in a Thread #12627
Comments
Not a solution, but have you considered using |
This works for me: # %%
import asyncio
from mne.utils import logger
k = 0
async def foo():
global k
try:
while k < 2000:
logger.info("test %i", k)
k += 1
await asyncio.sleep(0.00001)
except Exception as error:
raise error
# Create and run the async task using the existing event loop in IPython / Jupyter
task = asyncio.create_task(foo())
await task |
Which is logic as this is now running in a single |
But that one does work:
If I get that right, |
Description of the problem
When running the code snippet bellow in VSCode interactive window (using
ipykernel
), it fails atk=1012
on both Linux and Windows, with:Sane issue in MNE-LSL with a simpler
logger
: mne-tools/mne-lsl#260Steps to reproduce
An even simpler MWE:
If anyone has an idea about what I'm doing wrong in those MWE.. I'll try to see if we can prevent this in the first place.
The text was updated successfully, but these errors were encountered: