NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
462 stars 105 forks source link

AttributeError: module 'sys' has no attribute 'pltform' #141

Closed hkennyv closed 4 years ago

hkennyv commented 4 years ago

To reproduce:

  1. clone repository - git clone https://github.com/NiklasRosenstein/pydoc-markdown.git
  2. cd into repository - cd pydoc-markdown
  3. create virtualenv - virtualenv venv
  4. cd into package - cd pydoc-markdown (again)
  5. install package as editable - pip install -e .
  6. cd into parent - cd ..
  7. comment out hooks section in pydoc-markdown.yml (this throw an error on my machine because shut isn't a recognized command)
  8. run pydoc-markdown - ./venv/bin/pydoc-markdown --server -o

Error below:

(venv) khuynh@kmac:github/pydoc-markdown ‹develop*›$ /Users/khuynh/me/develop/github/pydoc-markdown/venv/bin/pydoc-markdown --server -o
Traceback (most recent call last):
  File "/Users/khuynh/me/develop/github/pydoc-markdown/venv/bin/pydoc-markdown", line 11, in <module>
    load_entry_point('pydoc-markdown', 'console_scripts', 'pydoc-markdown')()
  File "/Users/khuynh/me/develop/github/pydoc-markdown/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/khuynh/me/develop/github/pydoc-markdown/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/khuynh/me/develop/github/pydoc-markdown/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/khuynh/me/develop/github/pydoc-markdown/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/khuynh/me/develop/github/pydoc-markdown/pydoc-markdown/src/pydoc_markdown/main.py", line 334, in cli
    session.run_server(pydocmd, open_browser)
  File "/Users/khuynh/me/develop/github/pydoc-markdown/pydoc-markdown/src/pydoc_markdown/main.py", line 177, in run_server
    process = config.renderer.start_server()
  File "/Users/khuynh/me/develop/github/pydoc-markdown/pydoc-markdown/src/pydoc_markdown/contrib/renderers/hugo.py", line 306, in start_server
    hugo_bin = self._get_hugo_bin()
  File "/Users/khuynh/me/develop/github/pydoc-markdown/pydoc-markdown/src/pydoc_markdown/contrib/renderers/hugo.py", line 251, in _get_hugo_bin
    install_hugo(hugo_bin, self.get_hugo.version, self.get_hugo.extended)
  File "/Users/khuynh/me/develop/github/pydoc-markdown/pydoc-markdown/src/pydoc_markdown/contrib/renderers/hugo.py", line 343, in install_hugo
    elif sys.pltform.startswith('win32'):
hkennyv commented 4 years ago

I put in a PR to fix this :)

NiklasRosenstein commented 4 years ago

Thanks for catching it, the elaborate issue description and the fix. :) 🤘