ucall
ucall copied to clipboard
Bug: Server initialization sometimes fails on macOS
Describe the bug
When restarting a server rapidly after stopping it, it usually fails with this error:
Traceback (most recent call last):
server = Server()
^^^^^^^^
self.server = ucall.Server(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Server Initialization
Steps to reproduce
Setup a simple server (using Python):
from ucall.rich_posix import Server
server = Server()
@server
def test(name: str) -> str:
return f"Hello, {name}!"
def main():
server.run()
if __name__ == "__main__":
main()
Run it (let's call the file api.py
):
python api.py
In a new shell issue a request to the API:
ucall test name=Louis --uri 0.0.0.0 --port 8545
After the response control+C
the server to quit it, then try to restart the server using the same command as above. This fails with the aforementioned error during around 5 to 10 seconds.
Expected behavior
Server restart should not fail.
UCall version
v0.5.4
Operating System
macOS Sonoma 14.5
Hardware architecture
Arm
Which interface are you using?
Official Python bindings
Which implementation are you using?
POSIX
Contact Details
Is there an existing issue for this?
- [X] I have searched the existing issues
Code of Conduct
- [X] I agree to follow this project's Code of Conduct