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

Streamlit Error #112

Open
darinkishore opened this issue Sep 7, 2023 · 0 comments
Open

Streamlit Error #112

darinkishore opened this issue Sep 7, 2023 · 0 comments

Comments

@darinkishore
Copy link

Prompt: Let's set up the following recurrence relation in sympy: T(n) = 2T\left(\frac{n}{2}\right) + O(\frac{n}{ \log n})`

The work done is computed in the O() portion, and the recurrence relation is defined by T(n). N may be assumed to be powers of two. Set this up, and be extra careful when unrolling.

First set up the recurrence relation using sympy. After doing so, use sympy to unroll the equation once.

After unrolling it once, at T(n/2), you should get T(n/2) = 2T(n/4) + O ((n/2)/(log(n/2)). `

Output:
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x15ae24ed0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x15aed3770>, 50180.340346166)]']
connector: <aiohttp.connector.TCPConnector object at 0x15a987cd0>
Exception ignored in: <function BaseSubprocessTransport.del at 0x1036eb1a0>
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_subprocess.py", line 126, in del
self.close()
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_subprocess.py", line 104, in close
proto.pipe.close()
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/unix_events.py", line 566, in close
self._close(None)
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/unix_events.py", line 590, in _close
self._loop.call_soon(self._call_connection_lost, exc)
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
self._check_closed()
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
2023-09-06 23:10:10.066 Uncaught app exception
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/http.py", line 120, in read_response
status_line = await read_line(stream)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/http.py", line 200, in read_line
raise EOFError("line without CRLF")
EOFError: line without CRLF

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/client.py", line 139, in read_http_response
status_code, reason, headers = await read_response(self.reader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/http.py", line 122, in read_response
raise EOFError("connection closed while reading HTTP status line") from exc
EOFError: connection closed while reading HTTP status line

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/Users/darin/PycharmProjects/codeinterpreter-api/frontend/app.py", line 38, in
asyncio.run(get_images(input_text, files=uploaded_files_list))
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/darin/PycharmProjects/codeinterpreter-api/frontend/utils.py", line 25, in get_images
async with CodeInterpreterSession(model="gpt-3.5-turbo") as session:
File "/opt/homebrew/lib/python3.11/site-packages/codeinterpreterapi/session.py", line 478, in aenter
await self.astart()
File "/opt/homebrew/lib/python3.11/site-packages/codeinterpreterapi/session.py", line 87, in astart
status = SessionStatus.from_codebox_status(await self.codebox.astart())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/codeboxapi/box/localbox.py", line 187, in astart
await self._aconnect()
File "/opt/homebrew/lib/python3.11/site-packages/codeboxapi/box/localbox.py", line 199, in _aconnect
self.ws = await ws_connect(f"{self.ws_url}/kernels/{self.kernel_id}/channels")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/client.py", line 655, in await_impl_timeout
return await self.await_impl()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/client.py", line 662, in await_impl
await protocol.handshake(
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/client.py", line 323, in handshake
status_code, response_headers = await self.read_http_response()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/websockets/legacy/client.py", line 145, in read_http_response
raise InvalidMessage("did not receive a valid HTTP response") from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
^C Stopping...
Loop <_UnixSelectorEventLoop running=False closed=True debug=False> that handles pid 65491 is closed
/opt/homebrew/lib/python3.11/site-packages/codeboxapi/box/localbox.py:512: RuntimeWarning: coroutine 'Process.wait' was never awaited
Exception ignored in: <function BaseSubprocessTransport.del at 0x1036eb1a0>
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_subprocess.py", line 126, in del
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_subprocess.py", line 104, in close
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/unix_events.py", line 566, in close
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/unix_events.py", line 590, in _close
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
File "/opt/homebrew/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
RuntimeError: Event loop is closed

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