Skip to content
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

Error when running gcspypi --repository pypi #9

Open
NixBiks opened this issue Mar 20, 2019 · 5 comments
Open

Error when running gcspypi --repository pypi #9

NixBiks opened this issue Mar 20, 2019 · 5 comments

Comments

@NixBiks
Copy link

NixBiks commented Mar 20, 2019

Very neat library! (if its working)

When running

(venv) ➜  plx-annotator git:(master) ✗ gcspypi --repository pypi        

Then I get the following error

Traceback (most recent call last):
  File "venv/bin/gcspypi", line 11, in <module>
    load_entry_point('gcspypi==1.0.7', 'console_scripts', 'gcspypi')()
  File "venv/lib/python3.6/site-packages/ethronsoft/gcspypi/__main__.py", line 42, in main
    handlers[args["command"]](config, args)
KeyError: None

I have a bucket called pypi

@asaushkin
Copy link

@mr-bjerre Did you find the solution?

@NixBiks
Copy link
Author

NixBiks commented Feb 26, 2020

I’m not using the library

@aariyansh
Copy link

Even I am also getting the same error does anyone find this working . I even tried to define repository in ~/.gcspypirc and then upload the artifacts but it does not work .
gcspypi --repository <repo_name> upload dist/my-package-1.0.2.tar.gz
using repository gcspypi-bucket
connected
error: too many values to unpack (expected 2)

@ghost
Copy link

ghost commented Sep 2, 2020

Same here, anyone working on the issue ?

@jerryvurbl
Copy link

This error looks to me like its caused when a PKG-INFO file inside the package has lines that do not have a ":" in them. This apparently can happen with fields like "Description" or "License" which may have newlines.

One fix might be to only consider lines that match a regex like ^[^\s]+:\s+\S+ before k, v = line.split(":") below:

self = <ethronsoft.gcspypi.package.package_builder.PackageBuilder.__extract_source.<locals>.InfoCmd object at 0x10d6f4160>
target = <_io.TextIOWrapper name='./myapp-1.0.0/PKG-INFO' mode='r' encoding='UTF-8'>

    def __call__(self, target):
        m = {}
        for line in target.readlines():
>           k, v = line.split(":")
E           ValueError: too many values to unpack (expected 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants