prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  `plasma-calculator` does not launch on a Windows 10 system
  Original comment...https://github.com/PlasmaPy/PlasmaPy/pull/1610#discussion_r912220976
  
  The `plasma-calculator` does not launch when using a Windows 10 system...
  
  > Also, I get an error when trying to run the calculator on my windows machine...
  > 
  > ![image](https://user-images.githubusercontent.com/29869348/176960605-65eb86ed-4d28-4236-938f-f545927b70f8.png)
  >
  > My suspicion is whatever functionality is generating the file path is ignorant of a windows file separator, since the path and file name are mashed into one without a separator.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `plasmapy/utils/calculator/__init__.py`
  Content:
  ```
  1 """
  2 Script and utilities to launch the plasma calculator
  3 """
  4 __all__ = ["main"]
  5 
  6 import argparse
  7 import os
  8 import shlex
  9 import subprocess
  10 
  11 _description = """
  12 Plasma calculator is a tool that opens a page in a web browser for
  13 interactive calculation of plasma parameters.
  14 
  15 This tool is currently in the prototype stage and is expected to change in
  16 the future. Please raise an issue at the following link to provide suggestions
  17 and feedback: https://github.com/PlasmaPy/PlasmaPy/issues/new
  18 """
  19 
  20 
  21 def main():
  22     """
  23     Stub function for command line tool that launches the plasma calculator notebook.
  24     """
  25     parser = argparse.ArgumentParser(description=_description)
  26     parser.add_argument(
  27         "--port", type=int, default=8866, help="Port to run the notebook"
  28     )
  29     parser.add_argument(
  30         "--dark", action="store_true", help="Turn on dark mode, reduces eye strain"
  31     )
  32     parser.add_argument(
  33         "--no-browser", action="store_true", help="Do not open the browser"
  34     )
  35 
  36     # module_path = plasmapy.__path__[0]
  37     module_path = os.path.dirname(os.path.abspath(__file__))
  38     computed_calculator_path = os.path.join(module_path, "plasma_calculator.ipynb")
  39 
  40     args = parser.parse_args()
  41     theme = "dark" if args.dark else "light"
  42     no_browser = "--no-browser" if args.no_browser else ""
  43 
  44     command = f"voila {no_browser} --port={args.port} --theme={theme} {computed_calculator_path} \
  45         --VoilaConfiguration.file_whitelist favicon.ico"
  46     try:
  47         subprocess.call(shlex.split(command))
  48     except KeyboardInterrupt:
  49         print("Stopping calculator! Bye")
  50
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/plasmapy/utils/calculator/__init__.py b/plasmapy/utils/calculator/__init__.py
  --- a/plasmapy/utils/calculator/__init__.py
  +++ b/plasmapy/utils/calculator/__init__.py
  @@ -4,7 +4,7 @@
   __all__ = ["main"]
   
   import argparse
  -import os
  +import pathlib
   import shlex
   import subprocess
   
  @@ -33,17 +33,25 @@
           "--no-browser", action="store_true", help="Do not open the browser"
       )
   
  -    # module_path = plasmapy.__path__[0]
  -    module_path = os.path.dirname(os.path.abspath(__file__))
  -    computed_calculator_path = os.path.join(module_path, "plasma_calculator.ipynb")
  +    module_path = pathlib.Path(__file__).parent.absolute()
  +    notebook_path = module_path / "plasma_calculator.ipynb"
  +    favicon_path = module_path / "favicon.ico"
   
       args = parser.parse_args()
       theme = "dark" if args.dark else "light"
       no_browser = "--no-browser" if args.no_browser else ""
   
  -    command = f"voila {no_browser} --port={args.port} --theme={theme} {computed_calculator_path} \
  -        --VoilaConfiguration.file_whitelist favicon.ico"
  +    command = [
  +        "voila",
  +        notebook_path,
  +        f"--port={args.port}",
  +        f"--theme={theme}",
  +        f"--VoilaConfiguration.file_whitelist={favicon_path}",
  +    ]
  +    if no_browser:
  +        command.append(no_browser)
  +
       try:
  -        subprocess.call(shlex.split(command))
  +        subprocess.call(command)
       except KeyboardInterrupt:
           print("Stopping calculator! Bye")
  
verification_info: {"golden_diff": "diff --git a/plasmapy/utils/calculator/__init__.py b/plasmapy/utils/calculator/__init__.py\n--- a/plasmapy/utils/calculator/__init__.py\n+++ b/plasmapy/utils/calculator/__init__.py\n@@ -4,7 +4,7 @@\n __all__ = [\"main\"]\r\n \r\n import argparse\r\n-import os\r\n+import pathlib\r\n import shlex\r\n import subprocess\r\n \r\n@@ -33,17 +33,25 @@\n         \"--no-browser\", action=\"store_true\", help=\"Do not open the browser\"\r\n     )\r\n \r\n-    # module_path = plasmapy.__path__[0]\r\n-    module_path = os.path.dirname(os.path.abspath(__file__))\r\n-    computed_calculator_path = os.path.join(module_path, \"plasma_calculator.ipynb\")\r\n+    module_path = pathlib.Path(__file__).parent.absolute()\r\n+    notebook_path = module_path / \"plasma_calculator.ipynb\"\r\n+    favicon_path = module_path / \"favicon.ico\"\r\n \r\n     args = parser.parse_args()\r\n     theme = \"dark\" if args.dark else \"light\"\r\n     no_browser = \"--no-browser\" if args.no_browser else \"\"\r\n \r\n-    command = f\"voila {no_browser} --port={args.port} --theme={theme} {computed_calculator_path} \\\r\n-        --VoilaConfiguration.file_whitelist favicon.ico\"\r\n+    command = [\r\n+        \"voila\",\r\n+        notebook_path,\r\n+        f\"--port={args.port}\",\r\n+        f\"--theme={theme}\",\r\n+        f\"--VoilaConfiguration.file_whitelist={favicon_path}\",\r\n+    ]\r\n+    if no_browser:\r\n+        command.append(no_browser)\r\n+\r\n     try:\r\n-        subprocess.call(shlex.split(command))\r\n+        subprocess.call(command)\r\n     except KeyboardInterrupt:\r\n         print(\"Stopping calculator! Bye\")\n", "issue": "`plasma-calculator` does not launch on a Windows 10 system\nOriginal comment...https://github.com/PlasmaPy/PlasmaPy/pull/1610#discussion_r912220976\r\n\r\nThe `plasma-calculator` does not launch when using a Windows 10 system...\r\n\r\n> Also, I get an error when trying to run the calculator on my windows machine...\r\n> \r\n> ![image](https://user-images.githubusercontent.com/29869348/176960605-65eb86ed-4d28-4236-938f-f545927b70f8.png)\r\n>\r\n> My suspicion is whatever functionality is generating the file path is ignorant of a windows file separator, since the path and file name are mashed into one without a separator.\n", "before_files": [{"content": "\"\"\"\r\nScript and utilities to launch the plasma calculator\r\n\"\"\"\r\n__all__ = [\"main\"]\r\n\r\nimport argparse\r\nimport os\r\nimport shlex\r\nimport subprocess\r\n\r\n_description = \"\"\"\r\nPlasma calculator is a tool that opens a page in a web browser for\r\ninteractive calculation of plasma parameters.\r\n\r\nThis tool is currently in the prototype stage and is expected to change in\r\nthe future. Please raise an issue at the following link to provide suggestions\r\nand feedback: https://github.com/PlasmaPy/PlasmaPy/issues/new\r\n\"\"\"\r\n\r\n\r\ndef main():\r\n    \"\"\"\r\n    Stub function for command line tool that launches the plasma calculator notebook.\r\n    \"\"\"\r\n    parser = argparse.ArgumentParser(description=_description)\r\n    parser.add_argument(\r\n        \"--port\", type=int, default=8866, help=\"Port to run the notebook\"\r\n    )\r\n    parser.add_argument(\r\n        \"--dark\", action=\"store_true\", help=\"Turn on dark mode, reduces eye strain\"\r\n    )\r\n    parser.add_argument(\r\n        \"--no-browser\", action=\"store_true\", help=\"Do not open the browser\"\r\n    )\r\n\r\n    # module_path = plasmapy.__path__[0]\r\n    module_path = os.path.dirname(os.path.abspath(__file__))\r\n    computed_calculator_path = os.path.join(module_path, \"plasma_calculator.ipynb\")\r\n\r\n    args = parser.parse_args()\r\n    theme = \"dark\" if args.dark else \"light\"\r\n    no_browser = \"--no-browser\" if args.no_browser else \"\"\r\n\r\n    command = f\"voila {no_browser} --port={args.port} --theme={theme} {computed_calculator_path} \\\r\n        --VoilaConfiguration.file_whitelist favicon.ico\"\r\n    try:\r\n        subprocess.call(shlex.split(command))\r\n    except KeyboardInterrupt:\r\n        print(\"Stopping calculator! Bye\")\r\n", "path": "plasmapy/utils/calculator/__init__.py"}], "after_files": [{"content": "\"\"\"\r\nScript and utilities to launch the plasma calculator\r\n\"\"\"\r\n__all__ = [\"main\"]\r\n\r\nimport argparse\r\nimport pathlib\r\nimport shlex\r\nimport subprocess\r\n\r\n_description = \"\"\"\r\nPlasma calculator is a tool that opens a page in a web browser for\r\ninteractive calculation of plasma parameters.\r\n\r\nThis tool is currently in the prototype stage and is expected to change in\r\nthe future. Please raise an issue at the following link to provide suggestions\r\nand feedback: https://github.com/PlasmaPy/PlasmaPy/issues/new\r\n\"\"\"\r\n\r\n\r\ndef main():\r\n    \"\"\"\r\n    Stub function for command line tool that launches the plasma calculator notebook.\r\n    \"\"\"\r\n    parser = argparse.ArgumentParser(description=_description)\r\n    parser.add_argument(\r\n        \"--port\", type=int, default=8866, help=\"Port to run the notebook\"\r\n    )\r\n    parser.add_argument(\r\n        \"--dark\", action=\"store_true\", help=\"Turn on dark mode, reduces eye strain\"\r\n    )\r\n    parser.add_argument(\r\n        \"--no-browser\", action=\"store_true\", help=\"Do not open the browser\"\r\n    )\r\n\r\n    module_path = pathlib.Path(__file__).parent.absolute()\r\n    notebook_path = module_path / \"plasma_calculator.ipynb\"\r\n    favicon_path = module_path / \"favicon.ico\"\r\n\r\n    args = parser.parse_args()\r\n    theme = \"dark\" if args.dark else \"light\"\r\n    no_browser = \"--no-browser\" if args.no_browser else \"\"\r\n\r\n    command = [\r\n        \"voila\",\r\n        notebook_path,\r\n        f\"--port={args.port}\",\r\n        f\"--theme={theme}\",\r\n        f\"--VoilaConfiguration.file_whitelist={favicon_path}\",\r\n    ]\r\n    if no_browser:\r\n        command.append(no_browser)\r\n\r\n    try:\r\n        subprocess.call(command)\r\n    except KeyboardInterrupt:\r\n        print(\"Stopping calculator! Bye\")\r\n", "path": "plasmapy/utils/calculator/__init__.py"}]}