-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Two TrioInternalErrors #1132
Comments
I tested the first case and was able to conjure up the original exception that led to the
It looks like you're calling In general, it seems like Trio should be showing this traceback but here it gets swallowed. To show it, I edited
Do we want to add something like that to Trio? |
Ah you're completely right. Thanks! |
It would certainly be good if we could give a better error here. I don't know if this is the right solution though. How are we getting into a situation where the init task is exiting early? It seems like there must be some other bug to let that happen... |
At first glance, I can see that there's a I haven't figured out the "how" yet, but I'll dig back in when I get some time. |
Here's a boiled down version of a situation where the init task exits while the
It looks like making I'll be back in there later to figure out what's going on, but I thought I'd post this now in case anyone had any pointers on what to look for. |
async with trio.open_nursery() as nursery:
[...]
yield i Ah yeah this won't work – you can't From the discussion in chat, though, it sounded like it was concluded that this wasn't an example of yield-inside-nursery? (CC @oremanj) |
My conclusion was that this was not the most typical manifestation of misnesting of cancel scopes (which usually raises ValueError when removing a task from the cancel scope's |
Yeah, both of the errrors that @jtrakk reported run code with a yield inside a nursery block ( |
Closing this in favor of #1056, subpart "better support catching misnesting of nurseries". |
The exception is raised when I try to do the threaded-apply trick followed by another function. For example,
apply mario.testing.atools.wrapped_drop_falsy
followed bymap list
. There's a lot of non-Trio code here, and I don't expect anybody to wade through it all for a diagnosis, but perhaps at least the tracebacks are useful. Anyway, here's what I do to make it fail:There are two different TrioInternalError cases, depending on how i run it. The main code is in
sync_apply
.The text was updated successfully, but these errors were encountered: