codeinterpreter-api icon indicating copy to clipboard operation
codeinterpreter-api copied to clipboard

1st run time good but 2nd attempts always fail

Open michael230811 opened this issue 2 years ago • 3 comments

Could you please help me out on this issue?

1st run time good:

(venv) PS C:\Users\zhang\Downloads\codeinterpreter-api\examples> python show_ethereum_chart.py AI: Here is the Ethereum price chart for the year-to-date 2023. The x-axis represents the date and the y-axis represents the price in USD. Please note that the data is subject to the availability from the source. Exception ignored in: <function LocalBox.del at 0x00000266905C4860> Traceback (most recent call last): File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeboxapi\box\localbox.py", line 567, in del File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeboxapi\box\localbox.py", line 517, in stop OSError: [WinError 87] Parameter error.。

But I still got the exact chart from this command(python show_ethereum_chart.py) somehow.

But my 2nd attempt always failed even with SAME command line.

(venv) PS C:\Users\zhang\Downloads\codeinterpreter-api\examples> python show_ethereum_chart.py Traceback (most recent call last): File "C:\Users\zhang\Downloads\codeinterpreter-api\examples\show_ethereum_chart.py", line 19, in main() File "C:\Users\zhang\Downloads\codeinterpreter-api\examples\show_ethereum_chart.py", line 7, in main with CodeInterpreterSession(local=True) as session: File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeinterpreterapi\session.py", line 471, in enter self.start() File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeinterpreterapi\session.py", line 82, in start status = SessionStatus.from_codebox_status(self.codebox.start()) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeboxapi\box\localbox.py", line 107, in start self._connect() File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeboxapi\box\localbox.py", line 120, in _connect self.ws = ws_connect_sync(f"{self.ws_url}/kernels/{self.kernel_id}/channels") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\websockets\sync\client.py", line 289, in connect connection.handshake( File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\websockets\sync\client.py", line 85, in handshake raise TimeoutError("timed out during handshake") TimeoutError: timed out during handshake Exception ignored in: <function LocalBox.del at 0x000001545F734860> Traceback (most recent call last): File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeboxapi\box\localbox.py", line 567, in del File "C:\Users\zhang\Downloads\codeinterpreter-api\venv\Lib\site-packages\codeboxapi\box\localbox.py", line 514, in stop OSError: [WinError 6] Invalid handle

Thank you for your help in advance.

michael230811 avatar Aug 24 '23 06:08 michael230811

I have the same problem on Windows

viscovich avatar Aug 31 '23 10:08 viscovich

Same Issue using Windows 11, but I was never able to get it to work.

athrael-soju avatar Sep 28 '23 10:09 athrael-soju

I also encountered the same problem on Win11.

CaptainDP avatar Dec 29 '23 08:12 CaptainDP