From 8e5c0707d20c19e142e33c4fe2008163dac19c3b Mon Sep 17 00:00:00 2001 From: Mario Angst Date: Fri, 11 Nov 2022 13:04:53 +0100 Subject: [PATCH] change default port to 5002 Apple apparently now hogs localhost:5000 for their AirPlay devices. https://stackoverflow.com/questions/70913242/access-to-localhost-was-denied-you-dont-have-authorisation-to-view-this-page-h Given that many users are likely to serve displacy to their localhost, it might be nice to change the default port to something like 5002 (suggested above). Otherwise, users on macos Monterey will encounter a permission denied error (happened in my team). --- spacy/displacy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/displacy/__init__.py b/spacy/displacy/__init__.py index 7bb300afa..135a29e44 100644 --- a/spacy/displacy/__init__.py +++ b/spacy/displacy/__init__.py @@ -80,7 +80,7 @@ def serve( minify: bool = False, options: Dict[str, Any] = {}, manual: bool = False, - port: int = 5000, + port: int = 5002, host: str = "0.0.0.0", ) -> None: """Serve displaCy visualisation.