Skip to content
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

The bug with parse #266

Closed
dscss1 opened this issue Nov 5, 2024 · 8 comments
Closed

The bug with parse #266

dscss1 opened this issue Nov 5, 2024 · 8 comments
Labels
bug bug!

Comments

@dscss1
Copy link

dscss1 commented Nov 5, 2024

Describe the bug
IDK

To Reproduce

Traceback (most recent call last):
  File "/home/container/.local/lib/python3.11/site-packages/requests/models.py", line 974, in json
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 14570)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/container/bot.py", line 17, in <module>
    chatbot = hugchat.ChatBot(cookies=cookies.get_dict())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.11/site-packages/hugchat/hugchat.py", line 74, in __init__
    self.llms = self.get_remote_llms()
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/container/.local/lib/python3.11/site-packages/hugchat/hugchat.py", line 414, in get_remote_llms
    data = r.json()["nodes"][0]["data"]
           ^^^^^^^^
  File "/home/container/.local/lib/python3.11/site-packages/requests/models.py", line 978, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 2 column 1 (char 14570)

Expected behavior
I running my script with using the hugchatapi and this not working

Additional context
Ubuntu 22.04 LTS Docker
Python 3.11
The latest

@dscss1 dscss1 added the bug bug! label Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

Hi! Thanks for your issue, we will deal with your issue as soon as possible.

@we09532
Copy link

we09532 commented Nov 6, 2024

I got the same issue too `[27088] Failed to execute script 'main' due to unhandled exception!

json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 11832)

The above error occurred on
The above error occurred on `

@Aravind4525
Copy link

Aravind4525 commented Nov 6, 2024

chatbot = hugchat.ChatBot(cookies=cookies.get_dict())

Traceback (most recent call last):
File "C:\Users\Admin\PycharmProjects\New_PiCourseSearch\venv\Lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 11956)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Admin\PycharmProjects\New_PiCourseSearch\venv\Lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Extra data: line 2 column 1 (char 11956)
python-BaseException

here i got this error in ubuntu with different account now it is getting error but in local windows is getting error with different account

@Aravind4525
Copy link

when it will be fixed?

@dscss1
Copy link
Author

dscss1 commented Nov 11, 2024

IDK

@dscss1
Copy link
Author

dscss1 commented Dec 2, 2024

Update the library

@dscss1 dscss1 closed this as completed Dec 27, 2024
@perbeesh
Copy link

HI @dscss1 I am facing a similar issue. What is the solution??
Anyone else if they know, please reply

@dscss1
Copy link
Author

dscss1 commented Jan 21, 2025

Hello @perbeesh
I fixed the bug
Updated a library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug!
Projects
None yet
Development

No branches or pull requests

4 participants