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

Error on login #145

Closed
Pyno-code opened this issue Dec 1, 2023 · 1 comment
Closed

Error on login #145

Pyno-code opened this issue Dec 1, 2023 · 1 comment

Comments

@Pyno-code
Copy link

Pyno-code commented Dec 1, 2023

from hugchat import hugchat
from hugchat.login import Login
import os

os.system("cls")
sign = Login("email", input("mdp : "))
os.system("cls")
cookies = sign.login()

the code is raising this error can you help me ?

cookies = sign.login()
^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\hugchat\login.py", line 127, in login
if self.grantAuth(location):
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\hugchat\login.py", line 100, in grantAuth
res = self.requestsGet(location, allow_redirects=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\hugchat\login.py", line 28, in requestsGet
res = requests.get(
^^^^^^^^^^^^^
File "C:\Users\pynop\AppData\Roaming\Python\Python311\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pynop\AppData\Roaming\Python\Python311\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pynop\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pynop\AppData\Roaming\Python\Python311\site-packages\requests\sessions.py", line 486, in prepare_request
p.prepare(
File "C:\Users\pynop\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 368, in prepare
self.prepare_url(url, params)
File "C:\Users\pynop\AppData\Roaming\Python\Python311\site-packages\requests\models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '/login?next=
BIG LINK : No scheme supplied. Perhaps you meant ANOTHER BIG LINK

PS : i just tried the package i dont know realy how it works

@Pyno-code
Copy link
Author

my bad error of username and password

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

No branches or pull requests

1 participant