collective / collective.checkdocs

Distutils command to view and validate restructured text in package's long_description
10 stars 5 forks source link

showdocs #9

Open hildogjr opened 6 years ago

hildogjr commented 6 years ago

Running python3 setup.py showdocs on my package (Python3 Ubuntu 16.04), I am having a Py3 string / byte array issue:

running showdocs
<string>:47: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
reST to HTML conversion available at at http://localhost:6969/ - press CTRL+C to interrupt
127.0.0.1 - - [28/May/2018 23:58:54] "GET /0.9738612004795595 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 46896)
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 410, in handle_one_request
    method()
  File "/usr/local/lib/python3.5/dist-packages/collective/checkdocs/__init__.py", line 45, in do_GET
    self.copyfile(f, self.wfile)
  File "/usr/lib/python3.5/http/server.py", line 809, in copyfile
    shutil.copyfileobj(source, outputfile)
  File "/usr/lib/python3.5/shutil.py", line 76, in copyfileobj
    fdst.write(buf)
  File "/usr/lib/python3.5/socket.py", line 593, in write
    return self._sock.send(b)
TypeError: a bytes-like object is required, not 'str'
----------------------------------------
drhagen commented 5 years ago

I experience this same error on Python 3.7 on Windows 10. This happens even when checkdocs passes without issue. It happens even if I read long_description in as bytes.