jupyterlite/jupyterlite-sphinx

`BrokenPipeError` when serving local site

joelostblom opened this issue · 2 comments

Description

After serving my sphinx doc locally with python -m htttp.server, I frequently see this BrokenPipeError in the console. Everything seems to work fine so not sure if this is something to be worried about or if it is even related to jupyterlite.

BrokenPipeError: [Errno 32] Broken pipe
----------------------------------------
127.0.0.1 - - [19/Apr/2022 20:25:29] "GET /lite/files/bqplot.ipynb HTTP/1.1" 200 -
127.0.0.1 - - [19/Apr/2022 20:25:34] "GET /full.html HTTP/1.1" 200 -
127.0.0.1 - - [19/Apr/2022 20:25:34] "GET /lite/build/pypi/all.json HTTP/1.1" 200 -
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 34068)
Traceback (most recent call last):
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/socketserver.py", line 683, in process_request_thread
    self.finish_request(request, client_address)
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/http/server.py", line 1287, in finish_request
    self.RequestHandlerClass(request, client_address, self,
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/http/server.py", line 651, in __init__
    super().__init__(*args, **kwargs)
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/http/server.py", line 425, in handle
    self.handle_one_request()
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/http/server.py", line 413, in handle_one_request
    method()
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/http/server.py", line 658, in do_GET
    self.copyfile(f, self.wfile)
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/http/server.py", line 858, in copyfile
    shutil.copyfileobj(source, outputfile)
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/shutil.py", line 198, in copyfileobj
    fdst_write(buf)
  File "/home/joel/miniconda3/envs/altdev5/lib/python3.10/socketserver.py", line 826, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe
----------------------------------------

Context

  • JupyterLite version: 0.1.0b5
  • Operating System and version: PopOS 20.10
  • Browser and version: Firefox 98.02
Browser Output
Paste the output from your browser Javascript console here.

Hi, @joelostblom – it appears that your JupyterLite version is quite dated at this time, and several new releases for jupyterlite-sphinx have come out since. I tried using python -m http.server to serve the docs (I usually use sphinx-autobuild) and I did not face this error – it seems to have been resolved for what it was. Could you please try with a more recent version and see if that works?

Thanks for following up. I haven't been using jupyterlite-sphinx for a while so I'm happy to close this for now and re-open it if I encounter it again.