abhichaudharii / jiosaavn-python

An unofficial Python3 wrapper for JioSaavn API, a popular Indian music streaming service..
MIT License
2 stars 1 forks source link

Unable to install using pip #1

Closed arsaboo closed 1 year ago

arsaboo commented 1 year ago

Thanks for your work on this library. I am trying to install it, but get the following error:

pip install jiosaavn-python
Collecting jiosaavn-python
  Using cached jiosaavn-python-0.1.tar.gz (5.9 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\arsab\AppData\Local\Temp\pip-install-5b9zc9xk\jiosaavn-python_8563bb5007ee422badf08e34f8c77af3\setup.py", line 4, in <module>
          long_description = f.read()
        File "C:\Users\arsab\anaconda3\lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 267: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

My guess is we will need to modify the following to include encoding: https://github.com/abhichaudharii/jiosaavn-python/blob/8b0bddede4eaf643fe3d2810f9592d82d92f59c6/setup.py#L3

with open("README.md", encoding="utf8") as f or include errors="ignore"

abhichaudharii commented 1 year ago

Hello, Thanks for reporting. It is an encoding issue. I see your pull request as well. Let me merge that.

The pull request has been merged and the new version has been released. Can you please confirm that it works for you?

pip install jiosaavn-python==0.2

arsaboo commented 1 year ago

Yes, just tried pip install jiosaavn-python==0.2 and it works. Thanks for the quick merge and release!!