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

[Bug]: asyncio.run() cannot be called from a running event loop #660

Open
2 tasks done
mehtap198 opened this issue Oct 3, 2022 · 2 comments
Open
2 tasks done

[Bug]: asyncio.run() cannot be called from a running event loop #660

mehtap198 opened this issue Oct 3, 2022 · 2 comments

Comments

@mehtap198
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

when trying to run the historic_async.py in spyder keep getting the asyncio.run() running event loop error . I am running python 3.8

Could you kindly advice and help

Expected Behavior

Expecting price data for 200 symbols in the list [symbols]

SDK Version I encountered this issue in

python version 3.8.5

Steps To Reproduce

1.running historic_async.py
2.getting error

 RuntimeError: asyncio.run() cannot be called from a running event loop

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

No response

@yenla9
Copy link

yenla9 commented Jan 26, 2023

I am encountering the same issue. +1

@yenla9
Copy link

yenla9 commented Jan 26, 2023

I used solution 3 on this site and it resolved this issue:
import nest_asyncio
nest_asyncio.apply()

https://9to5answer.com/asyncio-run-cannot-be-called-from-a-running-event-loop

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