-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: expected string or bytes-like object #342
Comments
@chhantyal What version of twine do you have? What distributions are you trying to upload and how were they built? Any other steps for us to be able to reproduce? |
Also |
Sorry I was in hurry yesterday. Here is more details: Platform: OSX 10.12.6
I am trying to upload this package: https://github.com/chhantyal/parquet-cli
|
I am not sure what is the problem, I cloned this repo and ran from source. It worked.
However, develop command of same source still gives above error. |
Can you also include the version of |
Sure, here is wheel version:
wheel 0.31.0 |
Same thing for me:
|
@chhantyal @pior does this happen with the wheel alone or with the sdist alone? That'll help narrow things down |
@sigmavirus24 It happens with both, I tried them separately. |
Same here. It's been working for weeks, but started breaking a couple of days ago on our CI server |
Can you untar the sdist and paste the PKGINFO (or PKG-INFO) file into a comment here? I suspect this is related to gh-341 |
|
|
Interesting. @chhantyal we have your pkginfo version (1.4.1). @pior can you give us the full output of |
If one or both of you could email me the files that aren't working that'd be useful too. My email is on my profile |
In case you need the full PKG-INFO:
|
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 had the same issue. Found out that this was confusion between python3.6 and python2.7 packages. My |
I've provided a more useful stacktrace in #348 -- seems to be a bad interaction between twine and setuptools from the looks of it |
Like others, I was using 1.9.1 and upgrading to 1.11.0 resolved it for me. |
I started receiving this error after I updated pip from Upgrading twine to |
same here in ubuntu 18.04. updating using pip solves issue |
I am getting a similar issue when I try and use twine to upload a package. My twine version is: twine version 1.8.1 (pkginfo: 1.3.2, requests: 2.18.4, setuptools: 35.0.2,
requests-toolbelt: 0.7.0, clint: 0.5.1)
pip version 10.0.1
Python 3.6.4 :: Anaconda custom (x86_64) Looking at my package info file, my metadata version is Metadata-Version: 2.1. If this is the reason the package will not upload, is there an easy way to force the metadata version to be lower when building the source code and wheel? Thanks. |
@pmart123 the better choice is to use the newest twine version as others above have. I don't believe setuptools/wheel allows you to specify the metadata version |
@sigmavirus24 Thank you for the suggestion. I just upgraded Python to 3.6.5 and it seemed to resolve the issue. |
I'm going through the same issue, tried the various approaches mentioned here, but still it's not working. This might be a stupid question, but I'm not sure why I'm getting two different versions of twine when I check from the command line vs when I check from within Python:
Thanks! |
@eliasdabbas one thing you might try is:
And
|
Thanks @sigmavirus24
and cat $(which twine) gives this output:
Not sure how that might help? Sorry! The last comments suggest to upgrade to Python 3.6.5 and twine 1.11, which I have both already but I'm still getting the same error.
running Thanks. |
I can't help you without the output of
From the output of |
Thanks it might be an installation issue. It's just that I was getting the same error message mentioned in the title. |
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 Anyway updating twine in the root env solved it. And I could upload. |
@oscar6echo your comment saved me! uinstalling a globally installed twine made it using the one in the virtualenv! cheers! |
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 latest version (1.11) works.
@Akuukis so, when I look up the version of twine in my python3, it shows 1.11.0, but when I look it up on ubuntu terminal, it shows 1.8.1. Aside from the issue in question persisting, I'm now more confused as if I'm using twine version 1.8 or 1.11.
But
Trying to upgrade twine from the ubuntu results with a message that it's at its newest version 1.8.1-2. |
+1 for upgrading twine of 1.11 by |
Closing this as the original issue seems to be resolved by upgrading Twine, and this issue is attracting unrelated problems about multiple Twine installations. If you think you're having a related problem, please open a new issue. |
This gives us a much newer version, which is able to upload wheels. Also see pypa/twine#342
Hopefully fixing as pypa/twine#342
I had the same problem and solved it with: Solution from: |
Hi everyone,
I can't seem to figure why it is giving error, is it bug:
twine upload dist/*
I created
~/.pypirc
with creds. Also tried Env Vars, no luck :(The text was updated successfully, but these errors were encountered: