Closed hayilmaz closed 5 years ago
Did you figure it out?
It works differently in two different platforms.
In anaconda/jupyter it gives me error. In VSCode python, I don’t get the error message.
On Sep 23, 2019, at 3:01 PM, Amos Bastian notifications@github.com wrote:
Did you figure it out?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/amosbastian/understat/issues/9?email_source=notifications&email_token=AI56YAMOMMR7AHUGYZCSF33QLE4E3A5CNFSM4IZPGUK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7MM7QY#issuecomment-534302659, or mute the thread https://github.com/notifications/unsubscribe-auth/AI56YANDY7MLUYJMJWPWJFLQLE4E3ANCNFSM4IZPGUKQ.
If it's juypter notebook in ananconda, then put these lines at the top to fix that.
import nest_asyncio nest_asyncio.apply()
Great
Thank you
H. Adem Yilmaz
On Sep 25, 2019, at 1:31 PM, Tom notifications@github.com wrote:
If it's juypter notebook in ananconda, then put these lines at the top to fix that.
import nest_asyncio nest_asyncio.apply()
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
ran the following code:
async def main(): async with aiohttp.ClientSession() as session: understat = Understat(session) player = await understat.get_league_players( "epl", 2018, player_name="Paul Pogba", team_title="Manchester United" ) print(json.dumps(player))
loop = asyncio.get_event_loop() loop.run_until_complete(main())
got the following message:
RuntimeError Traceback (most recent call last)