microsoft / data-formulator

🪄 Create rich visualizations with AI
https://arxiv.org/abs/2408.16119
MIT License
1.35k stars 73 forks source link

Setting alternative port not possible or undocumented #38

Closed jmemcc closed 1 month ago

jmemcc commented 1 month ago

Hi there,

On running the pip installation of data_formulator I have had issues trying to assign an alternative port to run the tool on when using macOS. The message received is below.

Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port.
On macOS, try disabling the 'AirPlay Receiver' service from System Preferences -> General -> AirDrop & Handoff.

I understand that port 5000 is in use, but my preference is not to disable AirPlay Receiver, but to reassign data formulator to a different port - preferably through a command line arg in the style of the one flask uses like data_formulator -p 8008.

This may be something that I am missing and is possible already, but I can't see it. If it is not an existing option, I think it should be an option. Thank you.

timotk commented 1 month ago

@jmemcc I looked through the code and it does not seem possible.

I suggested the changes to set the port here: #39

Note that I also tried to do the following, but it does not work:

FLASK_RUN_PORT=5001 data_formulator

I suspect this is because you can only do this when running with the flask cli command.

Chenglong-MS commented 1 month ago

Thanks for the help! The port function is now included in the new build data_formulator 0.1.3b.

It's possible to run data_formulator --port 8080 to open it in a different port now.