Games-and-Simulations / sc-docker

Multi-platform Version of StarCraft: Brood War in a Docker Container, ready to use for bot play simulations.
MIT License
231 stars 40 forks source link

An error occurred while trying to build local image #27

Closed MicroDK closed 6 years ago

MicroDK commented 6 years ago

expected behaviour

When using scbw.play --install it should download starcraft.zip and build the image.

actual behaviour

Building the starcraft image fails. The starcraft.zip fails to download properly. In Chrome it says "Failed - Network error".

steps to reproduce

scbw.play --install --log_level=DEBUG

WARNING Path /Users/micky/.scbw found, re-installing scbw package. INFO This will re-create the base game image, continue? [Y/n] Y INFO checking docker version DEBUG Using docker API version b"'1.35'\n" INFO checking docker can run INFO checking docker has network sc_net DEBUG docker network id: b'806ffe6fb0c1\n' INFO creating docker local image INFO copying files from /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scbw/local_docker to /Users/micky/.scbw/docker INFO pulling image ggaic/starcraft:java, this may take a while... java: Pulling from ggaic/starcraft Digest: sha256:47c6ddbe6e8d609d42cf033b00b131463b6aeab2f636ac8bc589145846f463ab Status: Image is up to date for ggaic/starcraft:java INFO downloading starcraft.zip to /Users/micky/.scbw/docker/starcraft.zip DEBUG Starting new HTTP connection (1): files.theabyss.ru DEBUG http://files.theabyss.ru:80 "GET /sc/starcraft.zip HTTP/1.1" 200 105659792 DEBUG downloading from http://files.theabyss.ru/sc/starcraft.zip save as /Users/micky/.scbw/docker/starcraft.zip 99%|█████████████████████████████████████████████████████████████▌| 100/101 [00:37<00:00, 2.64MB/s] ERROR An error occurred while trying to build local image Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/response.py", line 302, in _error_catcher yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/response.py", line 384, in read data = self._fp.read(amt) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read n = self.readinto(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto n = self.fp.readinto(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/models.py", line 745, in generate for chunk in self.raw.stream(chunk_size, decode_content=True): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/response.py", line 436, in stream data = self.read(amt=amt, decode_content=decode_content) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/response.py", line 401, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 99, in exit self.gen.throw(type, value, traceback) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/urllib3/response.py", line 320, in _error_catcher raise ProtocolError('Connection broken: %r' % e, e) urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scbw/docker.py", line 119, in create_local_image starcraft_zip_file) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scbw/utils.py", line 61, in download_file unit_scale=True): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tqdm/_tqdm.py", line 955, in iter for obj in iterable: File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/models.py", line 748, in generate raise ChunkedEncodingError(e) requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scbw/cli.py", line 164, in main install() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scbw/install.py", line 26, in install create_local_image(SC_IMAGE) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scbw/docker.py", line 130, in create_local_image ('An error occurred while trying to build local image' % ())) scbw.error.DockerException: An error occurred while trying to build local image

operating system

macOS 10.12.6

docker version

output of command docker version:

Client: Version: 17.12.0-ce API version: 1.35 Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:03:51 2017 OS/Arch: darwin/amd64

Server: Engine: Version: 17.12.0-ce API version: 1.35 (minimum version 1.12) Go version: go1.9.2 Git commit: c97c6d6 Built: Wed Dec 27 20:12:29 2017 OS/Arch: linux/amd64 Experimental: true

scbw version

output of command scbw.play -v

0.2b3

michalsustr commented 6 years ago

Well it seems that the link is simply not accessible for you... no idea why, but the link works for me. Maybe ISP blocking russian sites?

MicroDK commented 6 years ago

Yes, you are right, it works from home, not at work. Not even https://starcraft.theabyss.eu/?files works. Anyway, it would be a good idea not to rely on external hosts, so is it possible to host the starcraft.zip file like the rest of sc-docker code in the GitHub repo? Or somewhere else...

michalsustr commented 6 years ago

This is a licensing issue. Although Broodwar released the game publicly, I'm not sure it's legal to mirror a copy. ICCUP released the file long ago, and there was no problem, but we don't want to risk it. So basically we decided to not include the game in the docker image, but let users download and build their images locally. According to laws of Czech republic (where I live) you can download licensed content from the internet, but you cannot distribute it.

If you want to host it somewhere and provide a link, I don't mind adding it to the list of download links :)

MicroDK commented 6 years ago

That is ok... :) At least provide info and download link in the documentation so if the download process fails for any reason, users can download it manually by other means and put it in the scbw data folder. Apparently, that russian website is not trustworthy even if they have an .eu domain. ;)