-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
The following code block works, or at least does not crash (it can give a 401 unauthorized HTML response) when run in Python alone. When run from inside of a JVM via jpy, it causes a SIGSEGV and subsequent crash.
I suspect asyncio is the culprit, however, I have successfully run asyncio code from within a JVM previously, so I'm not 100% sure.
import os
os.system('pip install yfinance')
import asyncio
import yfinance as yf
tickers = ['TSLA']
async def main():
order_count = 1
for _ in range(order_count):
for ticker in tickers:
underlying_stock = yf.Ticker(ticker)
print(underlying_stock.info)
if __name__ == '__main__':
asyncio.run(main())
passMetadata
Metadata
Assignees
Labels
No labels