Bug 921163 - fedpkg update fails: TypeError: argument of type 'NoneType' is not iterable
Summary: fedpkg update fails: TypeError: argument of type 'NoneType' is not iterable
Keywords:
Status: CLOSED DUPLICATE of bug 916725
Alias: None
Product: Fedora
Classification: Fedora
Component: python-fedora
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Toshio Ernie Kuratomi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 15:23 UTC by Richard W.M. Jones
Modified: 2013-03-13 16:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-13 16:09:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2013-03-13 15:23:42 UTC
Description of problem:

$ fedpkg update
Creating a new update for  libguestfs-1.20.4-1.fc18 
Password for rjones: 
Creating a new update for  libguestfs-1.20.4-1.fc18 
Traceback (most recent call last):
  File "/usr/bin/bodhi", line 523, in <module>
    main()
  File "/usr/bin/bodhi", line 220, in main
    data = bodhi.save(**update_args)
  File "/usr/lib/python2.7/site-packages/fedora/client/bodhi.py", line 111, in save
    'bugs': bugs,
  File "/usr/lib/python2.7/site-packages/fedora/client/baseclient.py", line 344, in send_request
    auth_params=auth_params, retries=retries)
  File "/usr/lib/python2.7/site-packages/fedora/client/proxyclient.py", line 394, in send_request
    if 'exc' in data:
TypeError: argument of type 'NoneType' is not iterable
Could not generate update request: Command 'bodhi --new --release f18 --file bodhi.template libguestfs-1.20.4-1.fc18 --username rjones' returned non-zero exit status 1

Here is my update:

[ libguestfs-1.20.4-1.fc18 ]                                                                 

# bugfix, security, enhancement, newpackage (required)
type=bugfix

# testing, stable                                                           
request=testing

# Bug numbers: 1234,9876
bugs=

# Description of your update                                                
notes=New upstream stable branch version 1.20.4.
 This contains only minor bug fixes and stability improvements
 and is a recommended update for every libguestfs user.

# Enable request automation based on the stable/unstable karma thresholds
autokarma=True
stable_karma=3
unstable_karma=-3

# Automatically close bugs when this marked as stable
close_bugs=True

# Suggest that users restart after update
suggest_reboot=False


Version-Release number of selected component (if applicable):

bodhi-client-0.9.3-1.fc18.noarch

How reproducible:

100%

Steps to Reproduce:
1. Submit an update as above.

Comment 1 Toshio Ernie Kuratomi 2013-03-13 15:37:39 UTC
Are you behind a proxy?  If so, this may be the same bug as: https://bugzilla.redhat.com/show_bug.cgi?id=916725

Do you have python-requests-1.1.0-3 installed?  https://admin.fedoraproject.org/updates/search/python-requests

If it's the proxy error, the new version of python-requests should fix it for us.  If it's a different error, the new version of python-requests should throw a different and less cryptic traceback.

Comment 2 Richard W.M. Jones 2013-03-13 15:48:16 UTC
(In reply to comment #1)
> Are you behind a proxy?  If so, this may be the same bug as:
> https://bugzilla.redhat.com/show_bug.cgi?id=916725

I am behind a proxy, yes.

> Do you have python-requests-1.1.0-3 installed? 
> https://admin.fedoraproject.org/updates/search/python-requests
> 
> If it's the proxy error, the new version of python-requests should fix it
> for us.  If it's a different error, the new version of python-requests
> should throw a different and less cryptic traceback.

python-requests-0.14.1-4.fc18.noarch

I will update to the version in updates-testing.  However I
won't be able to run the command again since I've already submitted
the update (unless you have a non-destructive way to test this).

Comment 3 Toshio Ernie Kuratomi 2013-03-13 16:02:08 UTC
If you're not afraid of a small python script:

import requests
from getpass import getpass

url = 'https://admin.fedoraproject.org/accounts/home'
username = raw_input()
password = getpass()
headers = {'Accept': 'application/json', 'User agent': 'testing client'}
params = {'user_name': username, 'password': password, 'login': 'Login'}
response = requests.post(url, data=params, headers=headers, verify=True)

print type(response.json)


should print NoneType before upgrading python-requests and something else (IIRC, a dict or a Bunch) afterwards.

Comment 4 Richard W.M. Jones 2013-03-13 16:09:50 UTC
With old python-requests:

<type 'NoneType'>

With the updated python-requests, it displays:

<type 'instancemethod'>

Consequently I am marking this bug as a duplicate of bug 916725.

*** This bug has been marked as a duplicate of bug 916725 ***


Note You need to log in before you can comment on or make changes to this bug.