pypa / twine

Utilities for interacting with PyPI
https://twine.readthedocs.io/
Apache License 2.0
1.62k stars 309 forks source link

HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/ '' is not a valid URL #1073

Closed kaufManu closed 8 months ago

kaufManu commented 8 months ago

Is there an existing issue for this?

What keywords did you use to search existing issues?

upload invalid URL ''

What operating system(s) are you using?

Windows 10

If you selected 'Other', describe your Operating System here

No response

What version of Python are you running?

Python 3.7.11

How did you install twine? Did you use your operating system's package manager or pip or something else?

pip install twine

What version of twine do you have installed (include the complete output)

twine version 4.0.2 (importlib-metadata: 4.11.3, keyring: 23.8.2, pkginfo:
1.8.3, requests: 2.28.1, requests-toolbelt: 0.9.1, urllib3: 1.26.11)

Which package repository are you using?

https://upload.pypi.org/legacy/

Please describe the issue that you are experiencing

I've switched to using token-based authentication and I'm since getting the following error message:

> python setup.py sdist bdist_wheel
> twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading aitviewer-1.13.0-py3-none-any.whl
100% ---------------------------------------- 265.5/265.5 kB • 00:00 • 587.5 kB/s
WARNING  Error during upload. Retry with the --verbose option for more details.
ERROR    HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
         '' is not a valid url. See https://packaging.python.org/specifications/core-metadata for more information.

I found several issues mentioning that this could be caused by a bad URL field in the setup.py, but as far as I can tell it's correct (also I never had this issue before and the URL in the setup.py did not change). I found this issue that mentioned that the URL should also be added to setup.cfg, which I did, but the same error message appears.

Please list the steps required to reproduce this behaviour

See issue description above.

Please include the PKG-INFO file contents from the artifact you're attempting to upload

Metadata-Version: 2.1
Name: aitviewer
Version: 1.13.0
Summary: Viewing and rendering of sequences of 3D data.
Home-page: https://github.com/eth-ait/aitviewer
Author: Manuel Kaufmann, Velko Vechev, Dario Mylonopoulos
Keywords: viewer,moderngl,machine learning,sequences,smpl,computer graphics,computer vision,3D,meshes,visualization
Platform: any
Requires-Python: >=3.7,<3.11
Description-Content-Type: text/markdown
License-File: LICENSE

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Tests](https://github.com/eth-ait/aitviewer/actions/workflows/tests.yml/badge.svg)](https://github.com/eth-ait/aitviewer/actions/workflows/tests.yml)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10013305.svg)](https://doi.org/10.5281/zenodo.10013305)

# [![aitviewer](assets/aitviewer_logo.svg)](https://github.com/eth-ait/aitviewer)
A set of tools to visualize and interact with sequences of 3D data with cross-platform support on Windows, Linux, and macOS. See the official page at [https://eth-ait.github.io/aitviewer](https://eth-ait.github.io/aitviewer/) for all the details.

## Installation
Basic Installation:

pip install aitviewer

Note that this does not install the GPU-version of PyTorch automatically. If your environment already contains it, you should be good to go, otherwise install it manually.

Or install locally (if you need to extend or modify code)
```commandline
git clone git@github.com:eth-ait/aitviewer.git
cd aitviewer
pip install -e .

On macOS with Apple Silicon it is recommended to use PyQt6. Please check this issue for installation instructions.

For more advanced installation and for installing SMPL body models, please refer to the documentation .

Features

aitviewer SMPL Editing

Quickstart

Display an SMPL T-pose (Requires SMPL models):

from aitviewer.renderables.smpl import SMPLSequence
from aitviewer.viewer import Viewer

if __name__ == '__main__':
    v = Viewer()
    v.scene.add(SMPLSequence.t_pose())
    v.run()

Projects using the aitviewer

A sampling of projects using the aitviewer. Let us know if you want to be added to this list!

Citation

If you use this software, please cite it as below.

@software{Kaufmann_Vechev_aitviewer_2022,
  author = {Kaufmann, Manuel and Vechev, Velko and Mylonopoulos, Dario},
  doi = {10.5281/zenodo.10013305},
  month = {7},
  title = {{aitviewer}},
  url = {https://github.com/eth-ait/aitviewer},
  year = {2022}
}

Contact & Contributions

This software was developed by Manuel Kaufmann, Velko Vechev and Dario Mylonopoulos. For questions please create an issue. We welcome and encourage module and feature contributions from the community.

aitviewer Sample


### A redacted version of your `.pypirc` file

```ini
[distutils]
  index-servers =
    pypi
    aitviewer

[pypi]
  username = __token__
  password = [hidden]

[aitviewer]
  repository = https://upload.pypi.org/legacy/
  username = __token__
  password = [hidden]

Anything else you'd like to mention?

No response

JAugusto42 commented 8 months ago

Hello, i added the project_urls and i coud send the package project_urls={ 'Documentation': 'https://your_package_name.readthedocs.io', 'Source': 'https://github.com/your_username/your_package_name', 'Bug Tracker': 'https://github.com/your_username/your_package_name/issues', } below the: ` install_requires=[

list of dependencies

],
`
kaufManu commented 8 months ago

That indeed solves it, thanks a lot for the quick reply!