anaconda-client icon indicating copy to clipboard operation
anaconda-client copied to clipboard

upload failures with zip files using python3 and v1.7.2

Open baleland opened this issue 6 years ago • 0 comments

there appears to be a str/bytes issue in inspect_pypi_package_zip, working on a pull request

this change is proposed,

diff --git a/binstar_client/inspect_package/pypi.py b/binstar_client/inspect_package/pypi.py
index 97fec63..2e9b39d 100644
--- a/binstar_client/inspect_package/pypi.py
+++ b/binstar_client/inspect_package/pypi.py
@@ -592,7 +592,7 @@ def inspect_pypi_package_zip(filename, fileobj):
         raise errors.NoMetadataError("Could not find EGG-INFO/PKG-INFO file "
                                      "in pypi sdist")

-    attrs = dict(Parser().parsestr(data.encode("UTF-8", "replace")).items())
+    attrs = dict(Parser().parsestr(data.encode("UTF-8", "replace").decode()).items())

     package_data = {'name': pop_key(attrs, 'Name'),
                     'summary': pop_key(attrs, 'Summary', None),

baleland avatar Apr 09 '20 23:04 baleland