-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeEncodeError: 'ascii' codec can't encode character '\u200b' in position 117: ordinal not in range(128) #7
Comments
So i just did a quick HTTPX library fix and now it seems to be working, but I encounter another error. I was just provided API Auth Token, hence i dont know what userID means. here
|
Hello! Excited that you were able to get early access, but sad that you ran into some issues. Rest assured that the team is currently looking into this. We'll provide updates soon... 🚀 |
Thanks! Looking forward to getting it fixed so i can try out the api.😇 |
Hi! It's been a bit - hope you're doing well! 😄 I was wondering if you could please try this again and let me know your results? |
I'm getting the same result today. Looking forward to diving in to Groq! |
It seems you may have a zero-width space character in your api key. Can you try removing it? |
@rattrayalex Yep, that was it! Working great now.. Thanks! |
@rattrayalex Alex! You're the best! Thank you for lending a hand. So happy that these are resolved. Happy exploring, guys! 🙌 |
Hello! I got early access to the api and I just ran the example code, but there seems to be an error with ASCII? Would you please check?
Traceback (most recent call last): File "/home/ubuntu/sample.py", line 9, in <module> chat_completion = client.chat.completions.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/groq/resources/chat/completions.py", line 175, in create return self._post( ^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/groq/_base_client.py", line 1186, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/groq/_base_client.py", line 888, in request return self._request( ^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/groq/_base_client.py", line 909, in _request request = self._build_request(options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/groq/_base_client.py", line 451, in _build_request headers = self._build_headers(options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/groq/_base_client.py", line 412, in _build_headers headers = httpx.Headers(headers_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/httpx/_models.py", line 70, in __init__ self._list = [ ^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/httpx/_models.py", line 74, in <listcomp> normalize_header_value(v, encoding), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.pyenv/versions/3.11.4/lib/python3.11/site-packages/httpx/_utils.py", line 53, in normalize_header_value return value.encode(encoding or "ascii") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'ascii' codec can't encode character '\u200b' in position 117: ordinal not in range(128)
The text was updated successfully, but these errors were encountered: