https://supertokens.com/ logo
t

TH

05/11/2022, 6:53 PM
Hey, I'm receiving the following error. (I'm working on macOS) RuntimeError: asyncio.run() cannot be called from a running event loop sys:1: RuntimeWarning: coroutine 'Supertokens.send_telemetry' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback
r

rp

05/11/2022, 6:55 PM
hey @TH
which version of the SDK?
λ

Λ C Ξ L X R D

05/11/2022, 6:56 PM
we are using the hosted sdk on your servers
r

rp

05/11/2022, 6:56 PM
no i mean which version of the supertokens-python SDK?
λ

Λ C Ξ L X R D

05/11/2022, 6:58 PM
0.7.2
r

rp

05/11/2022, 6:59 PM
huh.. that'd odd. Can you open an issue about this?
λ

Λ C Ξ L X R D

05/11/2022, 6:59 PM
will do 🙏
r

rp

05/11/2022, 7:00 PM
the app still works though right? it's just a warning that's getting printed out
λ

Λ C Ξ L X R D

05/11/2022, 7:00 PM
no the app doesnt want to start at all
it works for me fine tho (windows same version of sdk)
r

rp

05/11/2022, 7:01 PM
hmm.
λ

Λ C Ξ L X R D

05/11/2022, 7:01 PM
same project
r

rp

05/11/2022, 7:01 PM
which version of python?
(on the one that doesn't work)
λ

Λ C Ξ L X R D

05/11/2022, 7:01 PM
3.10.4
r

rp

05/11/2022, 7:02 PM
and on your machine?
λ

Λ C Ξ L X R D

05/11/2022, 7:02 PM
on windows?
3.10.4 as well
r

rp

05/11/2022, 7:02 PM
that's really strange
ok we will work on this ASAP! thanks
λ

Λ C Ξ L X R D

05/11/2022, 7:03 PM
appreciated thank you 😄
s

sattvikc

05/12/2022, 5:41 AM
@Λ C Ξ L X R D hello
could you share your init call?
λ

Λ C Ξ L X R D

05/12/2022, 6:45 AM
sure
s

sattvikc

05/12/2022, 6:46 AM
also can you share a bit more details on your setup? I am assuming fastapi on uvicorn
λ

Λ C Ξ L X R D

05/12/2022, 6:46 AM
Copy code
py
init(
    app_info=InputAppInfo(
        app_name="E-learning Websecurity",
        website_domain="http://localhost:8000",
        api_domain="http://localhost:8000"
        ),
    supertokens_config=SupertokensConfig(
        connection_uri=connectionURI,
        api_key=API_key,
        ),
    framework='fastapi',
    recipe_list=[
        session.init(
            error_handlers=session.InputErrorHandlers(
                on_unauthorised=unauthorised_handler,
                ),
            override=session.InputOverrideConfig(functions=override_session_functions)
            ),
        emailpassword.init(),
        ],
    mode='wsgi'
    )
s

sattvikc

05/12/2022, 6:47 AM
are you running on uvicorn or gunicorn ?
λ

Λ C Ξ L X R D

05/12/2022, 6:47 AM
yes fastapi on uvicorn
s

sattvikc

05/12/2022, 6:48 AM
mode='asgi' should be used for that combination
λ

Λ C Ξ L X R D

05/12/2022, 6:49 AM
O
maybe that was the cause of the problems all along 😅
s

sattvikc

05/12/2022, 6:50 AM
seems like, but it's strange you don't see it on windows
λ

Λ C Ξ L X R D

05/12/2022, 6:50 AM
i see it but it doesnt prevent the server from running
s

sattvikc

05/12/2022, 6:50 AM
okay
thank you for the find, we are adding a fix so that app start is not prevented
λ

Λ C Ξ L X R D

05/12/2022, 6:51 AM
Thank you for your help 😊🙏
2 Views