PIP package error: ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist

Viewed 423

so I'm trying to make a pip package so that I can publish it. However, when following the steps here, I get an error on the py -m build command.

The Error reads:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist

My folder structure is the same as given in the example on the site.

packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
│       └── some_file.py
│       └── chromedriver.exe
│       └── requirements.txt
│       └── some_file2.py
│       └── some_file3.py
└── tests/

Here is my setup.cfg

[metadata]
name = package-name
version = 0.0.1
author = name
author_email = email
description = words
long_description = file: README.md
long_description_content_type = text/markdown
url = link
project_urls =
    Bug Tracker = issuses link
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = src

and here is my pyproject.toml

[build-system]
requires = [
    "setuptools>=42",
    "wheel"
]
build-backend = "setuptools.build_meta"

I am unsure of what to do here, I read that it's an encoding issues and opened up some of the files such as codecs.py which is references and changed added a b to all the open . But still nothing. Any help would be appreciated!

0 Answers
Related