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

could not release a new package with zest.releaser 6.8 #206

Closed
faassen opened this issue Jan 13, 2017 · 13 comments
Closed

could not release a new package with zest.releaser 6.8 #206

faassen opened this issue Jan 13, 2017 · 13 comments

Comments

@faassen
Copy link

faassen commented Jan 13, 2017

I tried to release a new package to PyPI today (i.e. register it), but zest.releaser crashed. It crashed somewhere in requests-toolbelt trying to parse some JSON. Nothing appeared in PyPI. In the end I manually upload it using twine.

@reinout
Copy link
Collaborator

reinout commented Jan 13, 2017

Do you still have some console output you could copy/paste?

@reinout
Copy link
Collaborator

reinout commented Jan 13, 2017

@faassen
Copy link
Author

faassen commented Jan 13, 2017

Nope, I'm afraid I don't, I am afraid I lost that terminal history.

@mauritsvanrees
Copy link
Member

Uploading a new package to testpypi works for me. But to PyPI I get a traceback:

Traceback (most recent call last):
  File "/Users/maurits/tools/bin/fullrelease", line 36, in <module>
    sys.exit(zest.releaser.fullrelease.main())
  File "/Users/maurits/tools/src/zest.releaser/zest/releaser/fullrelease.py", line 27, in main
    releaser.run()
  File "/Users/maurits/tools/src/zest.releaser/zest/releaser/baserelease.py", line 353, in run
    self.execute()
  File "/Users/maurits/tools/src/zest.releaser/zest/releaser/release.py", line 69, in execute
    self._release()
  File "/Users/maurits/tools/src/zest.releaser/zest/releaser/release.py", line 305, in _release
    self._upload_distributions(package)
  File "/Users/maurits/tools/src/zest.releaser/zest/releaser/release.py", line 163, in _upload_distributions
    self._retry_twine('upload', server, filename)
  File "/Users/maurits/tools/src/zest.releaser/zest/releaser/release.py", line 189, in _retry_twine
    if repository.package_is_uploaded(package_file):
  File "/Users/maurits/shared-eggs/twine-1.8.1-py2.7.egg/twine/repository.py", line 176, in package_is_uploaded
    releases = response.json()['releases']
  File "/Users/maurits/shared-eggs/requests-2.9.1-py2.7.egg/requests/models.py", line 808, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Let me see what I can dig up with a pdb.

@reinout
Copy link
Collaborator

reinout commented Jan 13, 2017

@mauritsvanrees: I suspect the json decoder gets a html error page instead of readable json. Somewhere in twitter @faassen mentioned a "this is deprecated" output from one of the URLs.

@mauritsvanrees
Copy link
Member

I am trying to upload new package mauritstestpackage2. zest.releaser calls package_is_uploaded from twine, which downloads the url https://pypi.python.org/pypi/mauritstestpackage2/json, which gives a 404, which cannot be parsed as json.

Ah, it is basically this twine bug which I reported a while ago.

@mauritsvanrees
Copy link
Member

I am preparing a pull request for zest.releaser to work around it.

@reinout
Copy link
Collaborator

reinout commented Jan 13, 2017

@faassen: @mauritsvanrees fixes github issues faster than I react on twitter mentions :-)

@mauritsvanrees
Copy link
Member

Huh, I thought I had created a pull request, but I only created a branch. The Travis tests pass. I will merge and release.

@reinout
Copy link
Collaborator

reinout commented Jan 13, 2017

Ok

@mauritsvanrees
Copy link
Member

I have release 6.8.1 with a fix.

@reinout
Copy link
Collaborator

reinout commented Jan 13, 2017

Hurray!

@tkimnguyen
Copy link
Contributor

Interestingly I had to specify 6.8.1 explicitly, otherwise buildout pulled down 6.8... but I confirm 6.8.1 fixes said problem! Thx @mauritsvanrees

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