2017-07-26 1 views
0

Lorsque j'ai mis mon module sur le paquet lors du téléchargement sur pypi, quelque chose s'est mal passé et Je ne savais pas comment y remédier400 Erreur client: Environnement Web 'n'est pas un choix valide pour ce champ pour url: https://upload.pypi.org/legacy/

$ 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/ 

mon 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", 

    ], 
) 

mon .pypirc

[distutils] 
index-servers = 
pypi 

[pypi] 
username = your_username 
password = your_password 

ci-dessus est mon code, nous aidons examiner les raisons

Répondre

3

Vous manque une virgule après le 1er classificateur:

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

Sans la virgule Python concaténer les chaînes:

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

disfonctionnement Python bien connu. :-(