prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  PermissionError: [Errno 13] Permission denied
  I'm on Windows 10 WSL2 Ubuntu and this happens when I try to run `svc pre-resample`, what's going on?
  
  Traceback (most recent call last):
    File "/home/fab/miniconda3/envs/sovits/bin/svc", line 5, in <module>
      from so_vits_svc_fork.__main__ import cli
    File "/home/fab/miniconda3/envs/sovits/lib/python3.10/site-packages/so_vits_svc_fork/__init__.py", line 5, in <module>
      init_logger()
    File "/home/fab/miniconda3/envs/sovits/lib/python3.10/site-packages/so_vits_svc_fork/logger.py", line 31, in init_logger
      FileHandler(f"{__name__.split('.')[0]}.log"),
    File "/home/fab/miniconda3/envs/sovits/lib/python3.10/logging/__init__.py", line 1169, in __init__
      StreamHandler.__init__(self, self._open())
    File "/home/fab/miniconda3/envs/sovits/lib/python3.10/logging/__init__.py", line 1201, in _open
      return open_func(self.baseFilename, self.mode,
  PermissionError: [Errno 13] Permission denied: '/home/fab/sovits/so_vits_svc_fork.log'
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/so_vits_svc_fork/logger.py`
  Content:
  ```
  1 import os
  2 import sys
  3 from logging import (
  4     DEBUG,
  5     INFO,
  6     FileHandler,
  7     StreamHandler,
  8     basicConfig,
  9     captureWarnings,
  10     getLogger,
  11 )
  12 from pathlib import Path
  13 
  14 from rich.logging import RichHandler
  15 
  16 LOGGER_INIT = False
  17 
  18 
  19 def init_logger() -> None:
  20     global LOGGER_INIT
  21     if LOGGER_INIT:
  22         return
  23 
  24     IS_TEST = "test" in Path.cwd().stem
  25     package_name = sys.modules[__name__].__package__
  26     basicConfig(
  27         level=INFO,
  28         format="%(asctime)s %(message)s",
  29         datefmt="[%X]",
  30         handlers=[
  31             StreamHandler() if is_notebook() else RichHandler(),
  32             FileHandler(f"{package_name}.log"),
  33         ],
  34     )
  35     if IS_TEST:
  36         getLogger(package_name).setLevel(DEBUG)
  37     captureWarnings(True)
  38     LOGGER_INIT = True
  39 
  40 
  41 def is_notebook():
  42     try:
  43         from IPython import get_ipython
  44 
  45         if "IPKernelApp" not in get_ipython().config:  # pragma: no cover
  46             raise ImportError("console")
  47             return False
  48         if "VSCODE_PID" in os.environ:  # pragma: no cover
  49             raise ImportError("vscode")
  50             return False
  51     except Exception:
  52         return False
  53     else:  # pragma: no cover
  54         return True
  55
  ```
  --- 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/src/so_vits_svc_fork/logger.py b/src/so_vits_svc_fork/logger.py
  --- a/src/so_vits_svc_fork/logger.py
  +++ b/src/so_vits_svc_fork/logger.py
  @@ -1,14 +1,6 @@
   import os
   import sys
  -from logging import (
  -    DEBUG,
  -    INFO,
  -    FileHandler,
  -    StreamHandler,
  -    basicConfig,
  -    captureWarnings,
  -    getLogger,
  -)
  +from logging import DEBUG, INFO, StreamHandler, basicConfig, captureWarnings, getLogger
   from pathlib import Path
   
   from rich.logging import RichHandler
  @@ -29,7 +21,7 @@
           datefmt="[%X]",
           handlers=[
               StreamHandler() if is_notebook() else RichHandler(),
  -            FileHandler(f"{package_name}.log"),
  +            # FileHandler(f"{package_name}.log"),
           ],
       )
       if IS_TEST:
  
verification_info: {"golden_diff": "diff --git a/src/so_vits_svc_fork/logger.py b/src/so_vits_svc_fork/logger.py\n--- a/src/so_vits_svc_fork/logger.py\n+++ b/src/so_vits_svc_fork/logger.py\n@@ -1,14 +1,6 @@\n import os\n import sys\n-from logging import (\n-    DEBUG,\n-    INFO,\n-    FileHandler,\n-    StreamHandler,\n-    basicConfig,\n-    captureWarnings,\n-    getLogger,\n-)\n+from logging import DEBUG, INFO, StreamHandler, basicConfig, captureWarnings, getLogger\n from pathlib import Path\n \n from rich.logging import RichHandler\n@@ -29,7 +21,7 @@\n         datefmt=\"[%X]\",\n         handlers=[\n             StreamHandler() if is_notebook() else RichHandler(),\n-            FileHandler(f\"{package_name}.log\"),\n+            # FileHandler(f\"{package_name}.log\"),\n         ],\n     )\n     if IS_TEST:\n", "issue": "PermissionError: [Errno 13] Permission denied\nI'm on Windows 10 WSL2 Ubuntu and this happens when I try to run `svc pre-resample`, what's going on?\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/fab/miniconda3/envs/sovits/bin/svc\", line 5, in <module>\r\n    from so_vits_svc_fork.__main__ import cli\r\n  File \"/home/fab/miniconda3/envs/sovits/lib/python3.10/site-packages/so_vits_svc_fork/__init__.py\", line 5, in <module>\r\n    init_logger()\r\n  File \"/home/fab/miniconda3/envs/sovits/lib/python3.10/site-packages/so_vits_svc_fork/logger.py\", line 31, in init_logger\r\n    FileHandler(f\"{__name__.split('.')[0]}.log\"),\r\n  File \"/home/fab/miniconda3/envs/sovits/lib/python3.10/logging/__init__.py\", line 1169, in __init__\r\n    StreamHandler.__init__(self, self._open())\r\n  File \"/home/fab/miniconda3/envs/sovits/lib/python3.10/logging/__init__.py\", line 1201, in _open\r\n    return open_func(self.baseFilename, self.mode,\r\nPermissionError: [Errno 13] Permission denied: '/home/fab/sovits/so_vits_svc_fork.log'\n", "before_files": [{"content": "import os\nimport sys\nfrom logging import (\n    DEBUG,\n    INFO,\n    FileHandler,\n    StreamHandler,\n    basicConfig,\n    captureWarnings,\n    getLogger,\n)\nfrom pathlib import Path\n\nfrom rich.logging import RichHandler\n\nLOGGER_INIT = False\n\n\ndef init_logger() -> None:\n    global LOGGER_INIT\n    if LOGGER_INIT:\n        return\n\n    IS_TEST = \"test\" in Path.cwd().stem\n    package_name = sys.modules[__name__].__package__\n    basicConfig(\n        level=INFO,\n        format=\"%(asctime)s %(message)s\",\n        datefmt=\"[%X]\",\n        handlers=[\n            StreamHandler() if is_notebook() else RichHandler(),\n            FileHandler(f\"{package_name}.log\"),\n        ],\n    )\n    if IS_TEST:\n        getLogger(package_name).setLevel(DEBUG)\n    captureWarnings(True)\n    LOGGER_INIT = True\n\n\ndef is_notebook():\n    try:\n        from IPython import get_ipython\n\n        if \"IPKernelApp\" not in get_ipython().config:  # pragma: no cover\n            raise ImportError(\"console\")\n            return False\n        if \"VSCODE_PID\" in os.environ:  # pragma: no cover\n            raise ImportError(\"vscode\")\n            return False\n    except Exception:\n        return False\n    else:  # pragma: no cover\n        return True\n", "path": "src/so_vits_svc_fork/logger.py"}], "after_files": [{"content": "import os\nimport sys\nfrom logging import DEBUG, INFO, StreamHandler, basicConfig, captureWarnings, getLogger\nfrom pathlib import Path\n\nfrom rich.logging import RichHandler\n\nLOGGER_INIT = False\n\n\ndef init_logger() -> None:\n    global LOGGER_INIT\n    if LOGGER_INIT:\n        return\n\n    IS_TEST = \"test\" in Path.cwd().stem\n    package_name = sys.modules[__name__].__package__\n    basicConfig(\n        level=INFO,\n        format=\"%(asctime)s %(message)s\",\n        datefmt=\"[%X]\",\n        handlers=[\n            StreamHandler() if is_notebook() else RichHandler(),\n            # FileHandler(f\"{package_name}.log\"),\n        ],\n    )\n    if IS_TEST:\n        getLogger(package_name).setLevel(DEBUG)\n    captureWarnings(True)\n    LOGGER_INIT = True\n\n\ndef is_notebook():\n    try:\n        from IPython import get_ipython\n\n        if \"IPKernelApp\" not in get_ipython().config:  # pragma: no cover\n            raise ImportError(\"console\")\n            return False\n        if \"VSCODE_PID\" in os.environ:  # pragma: no cover\n            raise ImportError(\"vscode\")\n            return False\n    except Exception:\n        return False\n    else:  # pragma: no cover\n        return True\n", "path": "src/so_vits_svc_fork/logger.py"}]}