sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
3.9k stars 198 forks source link

On Mac, ctrl+c to quit the app raises alert #817

Closed virajkanwade closed 2 weeks ago

virajkanwade commented 1 month ago

Bug Description

Python quit unexpectedly. Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple.

Steps to Reproduce

Run the app with python app.py or python -m robyn app.py When the app is running press ctrl + c

Your operating system

MacOS

Your Python version (python --version)

3.12

Your Robyn version

latest

Additional Info

No response

sansyrox commented 1 month ago

hey @virajkanwade ,

Thanks for opening the issue 😄 Just to clarify - you mean ctrl +c , right?

virajkanwade commented 1 month ago

Thanks for opening the issue 😄 Just to clarify - you mean ctrl +c , right?

Yes, ctrl +c 😆

sansyrox commented 1 month ago

I am unable to replicate this. What is your MacOS version @virajkanwade ?

virajkanwade commented 1 month ago

@sansyrox Sonoma 14.5 Python 3.12 Macbook Pro M2 Max iTerm 3.4.23

Let me know if you want me to try something.

sansyrox commented 1 month ago

@virajkanwade , I am unable to replicate this issue. Could you try one more time? Or maybe if possible share a video?

virajkanwade commented 1 month ago

@sansyrox just did a quick test.

Screenshot 2024-06-01 at 8 51 58 PM

The output says abort python. Do you see the same?

virajkanwade commented 1 month ago

@sansyrox I think I found something,

Screenshot 2024-06-01 at 9 17 24 PM Screenshot 2024-06-01 at 9 17 38 PM
virajkanwade commented 1 month ago

def init_processpool

if sys.platform.startswith("win32") or processes == 1: calls spawn_process directly.

I think that is the issue in my case.

If I remove or processes == 1, I don't see the abort error.

sansyrox commented 2 weeks ago

@virajkanwade , thanks for diving in. But this is core feature of Robyn 😅 Shouldn't be the reason for a bug. However. I can have a deeper look. Once I upgrade my mac. i.e. within a few days.

sansyrox commented 2 weeks ago

Hey @virajkanwade 👋

I tried to replicate the issue but couldn't do it. There seems to be some permissions issue with your Python/terminal setup. I am closing this for now. But feel free to open it if the issue still persists 😄