Skip to content
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

AsyncLibraryNotFoundError #77

Closed
jrlopes2005 opened this issue May 19, 2023 · 6 comments
Closed

AsyncLibraryNotFoundError #77

jrlopes2005 opened this issue May 19, 2023 · 6 comments

Comments

@jrlopes2005
Copy link

Hi, im getting this issue in version 0.4.2.

asynclib_name = sniffio.current_async_library()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
raise AsyncLibraryNotFoundError(
sniffio._impl.AsyncLibraryNotFoundError: unknown async library, or not in async context

Any ideas?

@gi0baro
Copy link
Member

gi0baro commented May 19, 2023

Any ideas?

@jrlopes2005 not really without a complete stack trace/few more details, as I can't really tell what sniffio requires and/or in which moment of the application lifecycle you use it.

Also, since granian doesn't support trio, I'm not really sure what sniffio is needed for.

@jrlopes2005
Copy link
Author

jrlopes2005 commented May 25, 2023

I'll get deeper into the issue and try to figure it out...i'll be back soon with news, i hope

@gi0baro
Copy link
Member

gi0baro commented Jun 7, 2023

@jrlopes2005 I have a colleague of mine experiencing the same issue with starlette.

Can you please upgrade to 0.4.3, run Granian with --no-opt option and check if it works?

@gi0baro
Copy link
Member

gi0baro commented Jun 7, 2023

Related to #80

@jrlopes2005
Copy link
Author

Hi @gi0baro.

I tested it and it works fine now (i changed the loop_opt parameter value to False in the Granian instance).

Thanks for your support.

@gi0baro
Copy link
Member

gi0baro commented Jun 7, 2023

@jrlopes2005 nice! I'm closing this since 0.5 now targets #86

@gi0baro gi0baro closed this as completed Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants