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

probleme with Arbitrage.ipynb #9

Open
gui771 opened this issue Mar 21, 2023 · 4 comments
Open

probleme with Arbitrage.ipynb #9

gui771 opened this issue Mar 21, 2023 · 4 comments

Comments

@gui771
Copy link

gui771 commented Mar 21, 2023

Hello I have a problem at this step :

Creating Dataframe and Writing to Excel File

Error : ValueError Traceback (most recent call last)
in
----> 1 MAX_OUTCOMES = max([event.num_outcomes for event in arbitrage_events])
2 ARBITRAGE_EVENTS_COUNT = len(arbitrage_events)
3
4 my_columns = ['ID', 'Sport Key', 'Expected Earnings'] + list(np.array([[f'Bookmaker #{outcome}', f'Name #{outcome}', f'Odds #{outcome}', f'Amount to Buy #{outcome}'] for outcome in range(1, MAX_OUTCOMES + 1)]).flatten())
5 dataframe = pd.DataFrame(columns=my_columns)

ValueError: max() arg is an empty sequence

What I should do ?

@clamsultan
Copy link

I'm getting the same issue, let me know if you've been able to resolve it.

@Razvancbalaci
Copy link

Getting the same issue. Didn't find a answer yet.

@Ambrose997
Copy link

How come no one has bothered to answer this issue? It's something i'm experiencing too, and i'm baffled as to why.

@pandas9
Copy link

pandas9 commented Aug 1, 2023

It just means theres no arbitrage opportunities the list is empty you can fix it by

if arbitrage_events:
rest of code
else:
print('No arbitrage found')

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

5 participants