Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

video device not found

+2 votes
asked Feb 10, 2023 by Rachit Murarka (180 points)

I am trying to run a pygame code but ONLINEGDB is giving me an error:

pygame.error: No available video device

1 Answer

+1 vote
answered Feb 10, 2023 by Peter Minarik (86,040 points)
It's because the game would run on the server, not on your machine.

The way OnlineGDB works is that you write some code on your browser, that's sent to the server. It's compiled and run there and the standard output (characters) is sent back to your browser.

You have to install Python on your own machine to make it work.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...