twine: TypeError: expected string or bytes-like object
Hi everyone,
I can’t seem to figure why it is giving error, is it bug:
twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
TypeError: expected string or bytes-like object
I created ~/.pypirc with creds. Also tried Env Vars, no luck 😦
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 37 (12 by maintainers)
Commits related to this issue
- Now twine is broken?! Apparently the version that ships with Raspbian Stretch is incapable of uploading either the source or the wheel to PyPI (see pypa/twine#342; still open at this time) but the la... — committed to astro-pi/python-sense-emu by waveform80 6 years ago
- Update twine to 1.11.0 to resolve issue related to https://github.com/pypa/twine/issues/342 — committed to propertyshelf/buildout.plone by zcashero 5 years ago
- Install twine via pipsi This gives us a much newer version, which is able to upload wheels. Also see https://github.com/pypa/twine/issues/342 — committed to trustlines-protocol/builder by schmir 4 years ago
- Bump twine to 1.11.0 Hopefully fixing as https://github.com/pypa/twine/issues/342 — committed to mozilla/deepspeech-pkguploadworker by deleted user 6 years ago
Actually it is working for me now, with updated twine:
I was using 1.9.1 earlier.
Same here, upgrading to 1.11 seems to fix this
I started receiving this error after I updated pip from
9.0.1to10.0.1.Upgrading twine to
1.11.0resolved the problem.+1 for upgrading twine of 1.11 by
pip install -U twine.@oscar6echo your comment saved me! uinstalling a globally installed twine made it using the one in the virtualenv! cheers!
FYI
I had the same error a very similar situation as @eliasdabbas with the same 2 versions.
I was in a conda env and noticed that the path is modified for python to that
twine.__version__points to version 1.11,conda list twineshows the same but for some reason command linetwinedid invoke version 1.9.1, althoughwhich twinedid show a path leading under under my conda env.Anyway updating twine in the root env solved it. And I could upload.
I had the same issue. Found out that this was confusion between python3.6 and python2.7 packages. My
pippointed topip3.6so thatpip listnorpip uninstall twineunexpectedly did not found python2.7’s twine which sat in my PATH nevertheless. Uninstalling python2.7 twine solved the problem. Found withsudo find / -name twine