Open jjbrosnan opened 6 months ago
On the demo,
This kills the process:
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)
asyncio.run(main())
This also killed the worker:
import os
os.system('pip install yfinance')
import asyncio
import yfinance as yf
tickers = ['TSLA']
def main():
order_count = 1
for _ in range(order_count):
for ticker in tickers:
underlying_stock = yf.Ticker(ticker)
print(underlying_stock.info)
main()
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 runasyncio
code from within a JVM previously, so I'm not 100% sure.