We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error installing via pip
Greetings.
recently I tried to install datumaro via pip on Windows 10. 
I tried to do it on two devices and in both cases an error occured during installation due to encoding issues.

`       ...File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1251.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 3870: character maps to <undefined>
      [end of output]`

I tried to change encoding settings in PyCharm but it brought no results. I also tried to install different versions of datumaro (default, headless, versions), updated pip and used pip3. Python version is 3.11 hovewer I doubt it is involved.
Obviously it is Windows encoding issue, but I failed to find any related issues concerning the problem. Had someone seen the same error? 




--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # Copyright (C) 2019-2022 Intel Corporation
2 #
3 # SPDX-License-Identifier: MIT
4 
5 # ruff: noqa: E501
6 
7 import os
8 import os.path as osp
9 import re
10 from distutils.util import strtobool
11 
12 import setuptools
13 from pybind11.setup_helpers import Pybind11Extension, build_ext
14 
15 
16 def find_version(project_dir=None):
17     if not project_dir:
18         project_dir = osp.dirname(osp.abspath(__file__))
19 
20     file_path = osp.join(project_dir, "datumaro", "version.py")
21 
22     with open(file_path, "r") as version_file:
23         version_text = version_file.read()
24 
25     # PEP440:
26     # https://www.python.org/dev/peps/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions
27     pep_regex = r"([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*))?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*))?"
28     version_regex = r"__version__\s*=\s*.(" + pep_regex + ")."
29     match = re.match(version_regex, version_text)
30     if not match:
31         raise RuntimeError("Failed to find version string in '%s'" % file_path)
32 
33     version = version_text[match.start(1) : match.end(1)]
34     return version
35 
36 
37 CORE_REQUIREMENTS_FILE = "requirements-core.txt"
38 DEFAULT_REQUIREMENTS_FILE = "requirements-default.txt"
39 
40 
41 def parse_requirements(filename=CORE_REQUIREMENTS_FILE):
42     with open(filename) as fh:
43         return fh.readlines()
44 
45 
46 CORE_REQUIREMENTS = parse_requirements(CORE_REQUIREMENTS_FILE)
47 if strtobool(os.getenv("DATUMARO_HEADLESS", "0").lower()):
48     CORE_REQUIREMENTS.append("opencv-python-headless")
49 else:
50     CORE_REQUIREMENTS.append("opencv-python")
51 
52 DEFAULT_REQUIREMENTS = parse_requirements(DEFAULT_REQUIREMENTS_FILE)
53 
54 with open("README.md", "r") as fh:
55     long_description = fh.read()
56 
57 ext_modules = [
58     Pybind11Extension(
59         "datumaro._capi",
60         ["src/datumaro/capi/pybind.cpp"],
61         define_macros=[("VERSION_INFO", find_version("./src"))],
62         extra_compile_args=["-O3"],
63     ),
64 ]
65 
66 setuptools.setup(
67     name="datumaro",
68     version=find_version("./src"),
69     author="Intel",
70     author_email="emily.chun@intel.com",
71     description="Dataset Management Framework (Datumaro)",
72     long_description=long_description,
73     long_description_content_type="text/markdown",
74     url="https://github.com/openvinotoolkit/datumaro",
75     package_dir={"": "src"},
76     packages=setuptools.find_packages(where="src", include=["datumaro*"]),
77     classifiers=[
78         "Programming Language :: Python :: 3",
79         "License :: OSI Approved :: MIT License",
80         "Operating System :: OS Independent",
81     ],
82     python_requires=">=3.8",
83     install_requires=CORE_REQUIREMENTS,
84     extras_require={
85         "tf": ["tensorflow"],
86         "tfds": ["tensorflow-datasets"],
87         "tf-gpu": ["tensorflow-gpu"],
88         "default": DEFAULT_REQUIREMENTS,
89     },
90     ext_modules=ext_modules,
91     entry_points={
92         "console_scripts": [
93             "datum=datumaro.cli.__main__:main",
94         ],
95     },
96     cmdclass={"build_ext": build_ext},
97     package_data={
98         "datumaro.plugins.synthetic_data": ["background_colors.txt"],
99         "datumaro.plugins.openvino_plugin.samples": ["coco.class", "imagenet.class"],
100     },
101     include_package_data=True,
102 )
103
```
--- 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@
 
     file_path = osp.join(project_dir, "datumaro", "version.py")
 
-    with open(file_path, "r") as version_file:
+    with open(file_path, "r", encoding="utf-8") as version_file:
         version_text = version_file.read()
 
     # PEP440:
@@ -39,7 +39,7 @@
 
 
 def parse_requirements(filename=CORE_REQUIREMENTS_FILE):
-    with open(filename) as fh:
+    with open(filename, "r", encoding="utf-8") as fh:
         return fh.readlines()
 
 
@@ -51,7 +51,7 @@
 
 DEFAULT_REQUIREMENTS = parse_requirements(DEFAULT_REQUIREMENTS_FILE)
 
-with open("README.md", "r") as fh:
+with open("README.md", "r", encoding="utf-8") as fh:
     long_description = fh.read()
 
 ext_modules = [

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -19,7 +19,7 @@\n \n     file_path = osp.join(project_dir, \"datumaro\", \"version.py\")\n \n-    with open(file_path, \"r\") as version_file:\n+    with open(file_path, \"r\", encoding=\"utf-8\") as version_file:\n         version_text = version_file.read()\n \n     # PEP440:\n@@ -39,7 +39,7 @@\n \n \n def parse_requirements(filename=CORE_REQUIREMENTS_FILE):\n-    with open(filename) as fh:\n+    with open(filename, \"r\", encoding=\"utf-8\") as fh:\n         return fh.readlines()\n \n \n@@ -51,7 +51,7 @@\n \n DEFAULT_REQUIREMENTS = parse_requirements(DEFAULT_REQUIREMENTS_FILE)\n \n-with open(\"README.md\", \"r\") as fh:\n+with open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n     long_description = fh.read()\n \n ext_modules = [\n", "issue": "Error installing via pip\nGreetings.\r\nrecently I tried to install datumaro via pip on Windows 10. \r\nI tried to do it on two devices and in both cases an error occured during installation due to encoding issues.\r\n\r\n`       ...File \"C:\\Users\\User\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\encodings\\cp1251.py\", line 23, in decode\r\n          return codecs.charmap_decode(input,self.errors,decoding_table)[0]\r\n                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n      UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 3870: character maps to <undefined>\r\n      [end of output]`\r\n\r\nI tried to change encoding settings in PyCharm but it brought no results. I also tried to install different versions of datumaro (default, headless, versions), updated pip and used pip3. Python version is 3.11 hovewer I doubt it is involved.\r\nObviously it is Windows encoding issue, but I failed to find any related issues concerning the problem. Had someone seen the same error? \r\n\r\n\r\n\n", "before_files": [{"content": "# Copyright (C) 2019-2022 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\n# ruff: noqa: E501\n\nimport os\nimport os.path as osp\nimport re\nfrom distutils.util import strtobool\n\nimport setuptools\nfrom pybind11.setup_helpers import Pybind11Extension, build_ext\n\n\ndef find_version(project_dir=None):\n    if not project_dir:\n        project_dir = osp.dirname(osp.abspath(__file__))\n\n    file_path = osp.join(project_dir, \"datumaro\", \"version.py\")\n\n    with open(file_path, \"r\") as version_file:\n        version_text = version_file.read()\n\n    # PEP440:\n    # https://www.python.org/dev/peps/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions\n    pep_regex = r\"([1-9]\\d*!)?(0|[1-9]\\d*)(\\.(0|[1-9]\\d*))*((a|b|rc)(0|[1-9]\\d*))?(\\.post(0|[1-9]\\d*))?(\\.dev(0|[1-9]\\d*))?\"\n    version_regex = r\"__version__\\s*=\\s*.(\" + pep_regex + \").\"\n    match = re.match(version_regex, version_text)\n    if not match:\n        raise RuntimeError(\"Failed to find version string in '%s'\" % file_path)\n\n    version = version_text[match.start(1) : match.end(1)]\n    return version\n\n\nCORE_REQUIREMENTS_FILE = \"requirements-core.txt\"\nDEFAULT_REQUIREMENTS_FILE = \"requirements-default.txt\"\n\n\ndef parse_requirements(filename=CORE_REQUIREMENTS_FILE):\n    with open(filename) as fh:\n        return fh.readlines()\n\n\nCORE_REQUIREMENTS = parse_requirements(CORE_REQUIREMENTS_FILE)\nif strtobool(os.getenv(\"DATUMARO_HEADLESS\", \"0\").lower()):\n    CORE_REQUIREMENTS.append(\"opencv-python-headless\")\nelse:\n    CORE_REQUIREMENTS.append(\"opencv-python\")\n\nDEFAULT_REQUIREMENTS = parse_requirements(DEFAULT_REQUIREMENTS_FILE)\n\nwith open(\"README.md\", \"r\") as fh:\n    long_description = fh.read()\n\next_modules = [\n    Pybind11Extension(\n        \"datumaro._capi\",\n        [\"src/datumaro/capi/pybind.cpp\"],\n        define_macros=[(\"VERSION_INFO\", find_version(\"./src\"))],\n        extra_compile_args=[\"-O3\"],\n    ),\n]\n\nsetuptools.setup(\n    name=\"datumaro\",\n    version=find_version(\"./src\"),\n    author=\"Intel\",\n    author_email=\"emily.chun@intel.com\",\n    description=\"Dataset Management Framework (Datumaro)\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    url=\"https://github.com/openvinotoolkit/datumaro\",\n    package_dir={\"\": \"src\"},\n    packages=setuptools.find_packages(where=\"src\", include=[\"datumaro*\"]),\n    classifiers=[\n        \"Programming Language :: Python :: 3\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Operating System :: OS Independent\",\n    ],\n    python_requires=\">=3.8\",\n    install_requires=CORE_REQUIREMENTS,\n    extras_require={\n        \"tf\": [\"tensorflow\"],\n        \"tfds\": [\"tensorflow-datasets\"],\n        \"tf-gpu\": [\"tensorflow-gpu\"],\n        \"default\": DEFAULT_REQUIREMENTS,\n    },\n    ext_modules=ext_modules,\n    entry_points={\n        \"console_scripts\": [\n            \"datum=datumaro.cli.__main__:main\",\n        ],\n    },\n    cmdclass={\"build_ext\": build_ext},\n    package_data={\n        \"datumaro.plugins.synthetic_data\": [\"background_colors.txt\"],\n        \"datumaro.plugins.openvino_plugin.samples\": [\"coco.class\", \"imagenet.class\"],\n    },\n    include_package_data=True,\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright (C) 2019-2022 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\n# ruff: noqa: E501\n\nimport os\nimport os.path as osp\nimport re\nfrom distutils.util import strtobool\n\nimport setuptools\nfrom pybind11.setup_helpers import Pybind11Extension, build_ext\n\n\ndef find_version(project_dir=None):\n    if not project_dir:\n        project_dir = osp.dirname(osp.abspath(__file__))\n\n    file_path = osp.join(project_dir, \"datumaro\", \"version.py\")\n\n    with open(file_path, \"r\", encoding=\"utf-8\") as version_file:\n        version_text = version_file.read()\n\n    # PEP440:\n    # https://www.python.org/dev/peps/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions\n    pep_regex = r\"([1-9]\\d*!)?(0|[1-9]\\d*)(\\.(0|[1-9]\\d*))*((a|b|rc)(0|[1-9]\\d*))?(\\.post(0|[1-9]\\d*))?(\\.dev(0|[1-9]\\d*))?\"\n    version_regex = r\"__version__\\s*=\\s*.(\" + pep_regex + \").\"\n    match = re.match(version_regex, version_text)\n    if not match:\n        raise RuntimeError(\"Failed to find version string in '%s'\" % file_path)\n\n    version = version_text[match.start(1) : match.end(1)]\n    return version\n\n\nCORE_REQUIREMENTS_FILE = \"requirements-core.txt\"\nDEFAULT_REQUIREMENTS_FILE = \"requirements-default.txt\"\n\n\ndef parse_requirements(filename=CORE_REQUIREMENTS_FILE):\n    with open(filename, \"r\", encoding=\"utf-8\") as fh:\n        return fh.readlines()\n\n\nCORE_REQUIREMENTS = parse_requirements(CORE_REQUIREMENTS_FILE)\nif strtobool(os.getenv(\"DATUMARO_HEADLESS\", \"0\").lower()):\n    CORE_REQUIREMENTS.append(\"opencv-python-headless\")\nelse:\n    CORE_REQUIREMENTS.append(\"opencv-python\")\n\nDEFAULT_REQUIREMENTS = parse_requirements(DEFAULT_REQUIREMENTS_FILE)\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n    long_description = fh.read()\n\next_modules = [\n    Pybind11Extension(\n        \"datumaro._capi\",\n        [\"src/datumaro/capi/pybind.cpp\"],\n        define_macros=[(\"VERSION_INFO\", find_version(\"./src\"))],\n        extra_compile_args=[\"-O3\"],\n    ),\n]\n\nsetuptools.setup(\n    name=\"datumaro\",\n    version=find_version(\"./src\"),\n    author=\"Intel\",\n    author_email=\"emily.chun@intel.com\",\n    description=\"Dataset Management Framework (Datumaro)\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    url=\"https://github.com/openvinotoolkit/datumaro\",\n    package_dir={\"\": \"src\"},\n    packages=setuptools.find_packages(where=\"src\", include=[\"datumaro*\"]),\n    classifiers=[\n        \"Programming Language :: Python :: 3\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Operating System :: OS Independent\",\n    ],\n    python_requires=\">=3.8\",\n    install_requires=CORE_REQUIREMENTS,\n    extras_require={\n        \"tf\": [\"tensorflow\"],\n        \"tfds\": [\"tensorflow-datasets\"],\n        \"tf-gpu\": [\"tensorflow-gpu\"],\n        \"default\": DEFAULT_REQUIREMENTS,\n    },\n    ext_modules=ext_modules,\n    entry_points={\n        \"console_scripts\": [\n            \"datum=datumaro.cli.__main__:main\",\n        ],\n    },\n    cmdclass={\"build_ext\": build_ext},\n    package_data={\n        \"datumaro.plugins.synthetic_data\": [\"background_colors.txt\"],\n        \"datumaro.plugins.openvino_plugin.samples\": [\"coco.class\", \"imagenet.class\"],\n    },\n    include_package_data=True,\n)\n", "path": "setup.py"}]}