imyizhang / Suno-API

Unofficial API for Suno AI: make a song with Suno using v3 🥳
https://pypi.org/project/suno-api/
BSD 3-Clause "New" or "Revised" License
41 stars 6 forks source link

curl_cffi.requests.errors.RequestsError: impersonate chrome is not supported #1

Open Florianvo opened 7 months ago

Florianvo commented 7 months ago

I'm trying to get this to run but I get this error:

File "/opt/homebrew/lib/python3.11/site-packages/suno/suno.py", line 27, in init self._sid = self._get_sid() ^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/suno/suno.py", line 32, in _get_sid response = super().request("GET", url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/suno/suno.py", line 20, in request return self._session.request(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/curl_cffi/requests/session.py", line 618, in request req, buffer, header_buffer, q, header_recved, quit_now = self._set_curl_options( ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/curl_cffi/requests/session.py", line 382, in _set_curl_options raise RequestsError(f"impersonate {impersonate} is not supported") curl_cffi.requests.errors.RequestsError: impersonate chrome is not supported.

I am running curl_cffi at 0.6.0.

iSte94 commented 7 months ago

same problem

iSte94 commented 7 months ago

I'm trying to get this to run but I get this error:

File "/opt/homebrew/lib/python3.11/site-packages/suno/suno.py", line 27, in init self._sid = self._get_sid() ^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/suno/suno.py", line 32, in _get_sid response = super().request("GET", url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/suno/suno.py", line 20, in request return self._session.request(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/curl_cffi/requests/session.py", line 618, in request req, buffer, header_buffer, q, header_recved, quit_now = self._set_curl_options( ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/curl_cffi/requests/session.py", line 382, in _set_curl_options raise RequestsError(f"impersonate {impersonate} is not supported") curl_cffi.requests.errors.RequestsError: impersonate chrome is not supported.

I am running curl_cffi at 0.6.0.

I solved removing " # kwargs["impersonate"] = kwargs.get("impersonate", "chrome")" from suno.py file