[ERROR] OSError: [WinError 6] The handle is invalid using a vpn all the time
YotomiY opened this issue · 1 comments
YotomiY commented
Hello,
Got this error using a vpn all the time.
New g4f version: 0.2.2.3 (current: 0.2.1.5) | pip install -U g4f
Traceback (most recent call last):
File "C:\Users\\\MoneyPrinterV2\src\main.py", line 364, in <module>
main()
File "C:\Users\\\MoneyPrinterV2\src\main.py", line 101, in main
youtube.generate_video(tts)
File "C:\Users\\\MoneyPrinterV2\src\classes\YouTube.py", line 527, in generate_video
self.generate_prompts()
File "C:\Users\\MoneyPrinterV2\src\classes\YouTube.py", line 257, in generate_prompts
completion = str(self.generate_response(prompt, model=parse_model(get_image_prompt_llm())))\
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\\\MoneyPrinterV2\src\classes\YouTube.py", line 126, in generate_response
return g4f.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\\\MoneyPrinterV2\venv\Lib\site-packages\g4f\__init__.py", line 140, in create
return result if stream else ''.join([str(chunk) for chunk in result])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\\\MoneyPrinterV2\venv\Lib\site-packages\g4f\__init__.py", line 140, in <listcomp>
return result if stream else ''.join([str(chunk) for chunk in result])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\\\MoneyPrinterV2\venv\Lib\site-packages\g4f\Provider\retry_provider.py", line 65, in create_completion
self.raise_exceptions()
File "C:\Users\\\MoneyPrinterV2\venv\Lib\site-packages\g4f\Provider\retry_provider.py", line 114, in raise_exceptions
raise RetryProviderError("RetryProvider failed:\n" + "\n".join([
g4f.errors.RetryProviderError: RetryProvider failed:
You: ClientResponseError: 403, message='Forbidden', url=URL('https://you.com/api/streamingSearch?userFiles=&selectedChatMode=default')
GptForLove: MissingRequirementsError: Install "PyExecJS" package
GptGo: KeyError: 'choices'
ChatBase: ClientResponseError: 400, message='Bad Request', url=URL('https://www.chatbase.co/api/fe/chat')
Chatgpt4Online: ClientResponseError: 400, message='Can not decode content-encoding: brotli (br). Please install `Brotli`', url=URL('https://chatgpt4online.org/')
Exception ignored in: <function Chrome.__del__ at 0x0000018A5D07C040>
Traceback (most recent call last):
File "C:\Users\\\MoneyPrinterV2\venv\Lib\site-packages\undetected_chromedriver\__init__.py", line 843, in __del__
self.quit()
File "C:\Users\\\MoneyPrinterV2\venv\Lib\site-packages\undetected_chromedriver\__init__.py", line 798, in quit
time.sleep(0.1)
OSError: [WinError 6] The handle is invalid
FujiwaraChoki commented
It is telling you what you need go install.