Skip to content

SIGSEGV when using asyncio and yfinance #148

@jjbrosnan

Description

@jjbrosnan

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())
    pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions