meet447 / Reddit-Karma-Bot

A python script that can help you get karma by commenting on subreddits automatically.
14 stars 4 forks source link

cannot use comment mode #4

Open LeGvu opened 1 week ago

LeGvu commented 1 week ago

SUCCESS] - recived title SUCCESS] - recived content Traceback (most recent call last): File "C:\Users\Le\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Le\AppData\Local\Programs\Python\Python312\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Le\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Le\AppData\Local\Programs\Python\Python312\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Le\Reddit-Karma-Bot\llm\main.py", line 20, in create_response response_data = response.json() ^^^^^^^^^^^^^^^ File "C:\Users\Le\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Le\Reddit-Karma-Bot\app.py", line 236, in reddit_bot.run() File "C:\Users\Le\Reddit-Karma-Bot\app.py", line 229, in run self.generate_comment( File "C:\Users\Le\Reddit-Karma-Bot\app.py", line 114, in generate_comment comment = create_response(post=new_prompt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Le\Reddit-Karma-Bot\llm\main.py", line 57, in create_response g4f.Provider.Vercel, ^^^^^^^^^^^^^^^^^^^ AttributeError: module 'g4f.Provider' has no attribute 'Vercel'

sammadox commented 3 days ago

Hello, have you tried to check the response object?