Closed Bug 1015934 Opened 10 years ago Closed 10 years ago

Failure "TypeError: request() got an unexpected keyword argument 'config'" on amazon dnsless spot instances


(Infrastructure & Operations Graveyard :: CIDuty, task)

Not set


(Not tracked)



(Reporter: cbook, Assigned: rail)





(1 file)

Android 2.2 mozilla-central nightly on 2014-05-26 03:11:51 PDT for push e86a0d92d174

slave: bld-linux64-spot-1008

TypeError: request() got an unexpected keyword argument 'config'
From a superficial inspection, it looks like a conflict between parameters passed here: 


and the allowed params here:


Notably, we are passing a parameter called "config", which is not expected by the function.

However, I don't understand why we didn't always get this problem - since this code seems to have gone live around two months ago...

However, I haven't dug very deep, because I know Ben will be online shortly to help out ;)

Flags: needinfo?(bhearsum)
We haven't upgraded the "requests" library in build/tools in ages (it's using 0.10.8: - there must be a different one getting into PYTHONPATH somehow. Did any new system libraries get installed or some such?
Flags: needinfo?(bhearsum)
since this affects nightlys on android on serveral trees like beta/aurora i reset the severity
Severity: normal → critical
Looks like this is only a problem with the new dnsless EC2 machines. They have a very new Requests installed in the system Python:
[ ~]$ rpm -qa | grep requests

Whereas other machines don't:
[ ~]$ rpm -qa | grep requests
[ ~]$
Blocks: 1001714
We use site.addsitedir(...) to add paths to our "lib/python" directory which contains vendorlibs.pth with paths to the vendor packages we use. The site module adds the libraries we need but doesn't instert them prior to the system wide packages.

This is how mod_wsgi manages their sys.path (from

ALLDIRS = ['usr/local/pythonenv/PYLONS-1/lib/python2.5/site-packages']

import sys 
import site 

# Remember original sys.path.
prev_sys_path = list(sys.path) 

# Add each new site-packages directory.
for directory in ALLDIRS:

# Reorder sys.path so new directories at the front.
new_sys_path = [] 
for item in list(sys.path): 
    if item not in prev_sys_path: 
sys.path[:0] = new_sys_path
Attached patch path.diffSplinter Review
Attachment #8428736 - Flags: review?(bhearsum)
Comment on attachment 8428736 [details] [diff] [review]

Review of attachment 8428736 [details] [diff] [review]:

Sucks, but necessary...can you make sure there's a bug on file to get using non-emebbed libs?

Thanks for fixing this.
Attachment #8428736 - Flags: review?(bhearsum) → review+
From phone. Can't we use the requests module not in system python?  I'm not really a fan of anything extra in system python directory. Always causes confusion.  (Sent from phone)
Assignee: nobody → rail
Summary: Android 2.2 Nightly's fail with TypeError: request() got an unexpected keyword argument 'config' → Failure "TypeError: request() got an unexpected keyword argument 'config'" on amazon dnsless spot instances
Closed: 10 years ago
Resolution: --- → FIXED
Product: Release Engineering → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.