I’m a complete beginner to network programming. I’m writing a program to allow me to play board games with my friends throughout isolation (I know, I know, there are already similar programs available online, but I want to make my own to make myself a better programmer). I’m trying to use the websockets library on python to allow me and my friends to connect to the droplet I’ve set up. When my client tried to connect to the server I get the following error:
RuntimeError Traceback (most recent call last) ~\Desktop\test_program\client2.py in <module> 23 24 ---> 25 asyncio.get_event_loop().run_until_complete(communicate()) ~\AppData\Local\Continuum\anaconda3\lib\asyncio\base_events.py in run_until_complete(self, future) 558 future.add_done_callback(_run_until_complete_cb) 559 try: --> 560 self.run_forever() 561 except: 562 if new_task and future.done() and not future.cancelled(): ~\AppData\Local\Continuum\anaconda3\lib\asyncio\base_events.py in run_forever(self) 513 self._check_closed() 514 if self.is_running(): --> 515 raise RuntimeError('This event loop is already running') 516 if events._get_running_loop() is not None: 517 raise RuntimeError( RuntimeError: This event loop is already running
Does anyone know what I might be doing incorrectly? Could it be an issue with the firewall on my computer or on my droplet?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!