0

当我在上传到 pypi 时将模块放在包上时,出了点问题,我不知道如何修复它

$ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading zaoshu-0.1.1-py3-none-any.whl

HTTPError: 400 Client Error: classifiers: 'Development Status :: 4 - 
BetaEnvironment :: Web Environment' is not a valid choice for this 
field for url: https://upload.pypi.org/legacy/

我的 setup.py

setup(
    name="zaoshu",
    version="0.1.1",
    author="Wei Cheng",
    author_email="*****@zaoshu.io",
    description="zaoshu包实现里对造数openapi功能的封装,提高开发效率.",
    long_description=open("README.md").read(),
    license="MIT",
    url="https://github.com/zaoshu/pysdk",
    packages=['zaoshu'],
    install_requires=[
        "requests",
    ],
    python_requires = '> = 3',
    classifiers=[
        "Development Status :: 4 - Beta"
        "Environment :: Web Environment",
        "Intended Audience :: Developers",
        "License :: Free For Home Use",
        "Natural Language :: Chinese (Simplified)",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.0",
        "Programming Language :: Python :: 3.1",
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: 3.3",

    ],
)

我的 .pypirc

[distutils] 
index-servers  =
pypi 

[pypi] 
username = your_username 
password = your_password

以上是我的代码,大家帮忙看看原因

4

1 回答 1

3

您在第一个分类器之后缺少逗号:

classifiers=[
        "Development Status :: 4 - Beta", <<<=== Here!

没有逗号 Python 连接字符串:

classifiers=[
    "Development Status :: 4 - BetaEnvironment :: Web Environment",

众所周知的 Python 错误功能。:-(

于 2017-07-26T12:31:52.147 回答