Ask coding questions

← Back to all posts
Polygott REPL stuck downloading Pygame
h
PaoloAmoroso (131)

This is a fork of a Polygott demo featuring a Flappy Bird like game based on Pygame, but otherwise I haven't changed it. When I click run, the console gets stuck downloading the Pygame wheel (sometimes the tarball) with a status message like this and a download progress that doesn't go beyond 15-40%:

Downloading https://files.pythonhosted.org/packages/d6/07/115e632437dc28cc624e92da6e1c69e7b3232cfe2f3d7e0aa3c8353cdf18/pygame-1.9.6-cp27-cp27mu-manylinux1_x86_64.whl (11.3MB)

Why doesn't the download complete and the app run? Is this a Repl.it or a remote server issue? Any suggestions?

I'm using Chrome OS Stable on a Chromebox.

Answered by Saibot84 (11) [earned 5 cycles]
View Answer
Commentshotnewtop
Saibot84 (11)

To answer your question, I've noticed that leaving the console waiting on a single program for too long seems to crash the polygott container.
This includes pip install, downloads, etc. This is probably to prevent the container from getting hung (thought I only assume that). To get around this issue, I use nohup command_here in the makefile or nohup command_here & in bash to pipe output to the nohup.out file instead of to the console.

Here's a fork of this FlapehBurd demo that works for me: https://repl.it/@Saibot84/FlapehBurd

And here are the steps I took to make it run:

  • either using makefile or by running bash, run nohup pip download -d ./ pygame You can check nohup.out to see the progress.

  • change pip install pygame to pip install --no-index --find-links=./ pygame

  • instead of using x11vnc, I changed it to use polygott's own polygott-x11-vnc so I commented the killall, Xvfb, and x11vnc commands

I hope that helps.

PaoloAmoroso (131)

@Saibot84 Thanks for sharing your experience and tips, very useful.