mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.03k stars 797 forks source link

Can't pip install from github because of README.rst #906

Closed thomasfrederikhoeck closed 3 years ago

thomasfrederikhoeck commented 4 years ago

I'm trying to install pip install git+https://github.com/mukulhase/WebWhatsapp-Wrapper.git. I get the following error message:

 Running command git clone -q https://github.com/mukulhase/WebWhatsapp-Wrapper.git /tmp/pip-req-build-kkx6i7gx
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-kkx6i7gx/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-kkx6i7gx/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hf5pp7wl
         cwd: /tmp/pip-req-build-kkx6i7gx/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-kkx6i7gx/setup.py", line 50, in <module>
        with open(os.path.join(os.path.dirname(__file__), "README.rst"), encoding="utf-8") as f:
      File "/usr/local/lib/python3.7/codecs.py", line 904, in open
        file = builtins.open(filename, mode, buffering)
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-kkx6i7gx/README.rst'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It looks like it is because it can't find README.rst. Is this because the file is called README.md?

onioneffect commented 4 years ago

Is this because the file is called README.md?

Most likely. On my installation, moving the file from md to rst at omitted the error if not fixed it.

andreguilhon commented 4 years ago

The problem lies in the setup.py file, that tries to read README.rst to get the long description. Either renaming/copying README.md to README.rst or changing the file read by setup (in line 50) works fine and solve the problem entirely. I sent a pull request with this change.

onioneffect commented 3 years ago

We should close this issue, because it is fixed by pull request #929.