Robyn not running on OS X
Bug Description
Hi everybody, First of all, congratulations on your great work. I'm trying to test Robyn on an OS X (Macbook pro M4 Pro, latest Sequoia OS X, Python3.11) environment in order to compare it to Sanic. I'm getting an invalid port error, sanic runs fine on the same port. Is there a known issue with OS X? Thanks in advance André
Steps to Reproduce
hello world program:
from robyn import Robyn
Create an instance of Robyn app
app = Robyn(file)
Define a basic route
@app.get("/") async def home(): return "Hello World!"
Start the Robyn server
if name == "main": app.start(port=8081)
Your operating system
MacOS
Your Python version (python --version)
3.11
Your Robyn version
latest
Additional Info
I'd be happy to do some testing
Hey @amdescombes 👋
It does work for me. Could you send me the response of lsof -i tcp:8081 from your terminal?
Hi @sansyrox, lsof -i tcp:8081 does not return anything and when I run a Sanic Hello World program on the same port it works fine! Thanks
Here's the exception I get:
Traceback (most recent call last):
File "/Users/amdescombes/Desktop/Desktop - Andre’s MacBook Pro/AMD/BinanceTest/testrobyn.py", line 13, in
Hey @amdescombes 👋
What command are you using to run the script?
I'm running like so (I pass no arguments to it):
python3.11 testrobyn.py
Are you running on an Intel or an Apple processor @sansyrox ? I tried running on Python3.9 and it didn't work either
@amdescombes , I am running on an apple processor.
@VishnuSanal , can you try once?
@amdescombes , could you please share a github gist of the code?
Hi @sansyrox here is the requested code:
from robyn import Robyn
app = Robyn(__file__)
@app.get("/")
async def home():
return "Hello, Robyn!"
if __name__ == "__main__":
app.start(port=8081)
That is the code that doesn't work
Hey @amdescombes 👋
I am unable to replicate the bug. Can you share your mac os version?
Yes, I'm running on Macbook Pro M3 Max with Sequoia 15.0.1 (24A348)
what's strange is that I can open the same port with CherryPy, Flask or Sanic with no problems
@amdescombes , is port 8080 or 8082 working?
Yessss
Thanks, it must be something with 8081
Alright, then. Closing.