[USRP-users] Reg : Image Downloader

Marcus Müller marcus.mueller at ettus.com
Wed Oct 21 10:49:35 EDT 2015


> It is likely the case that python-requests doesn't automatically use
> the HTTP_PROXY variable, like various other url handlers do, which is
>   why wget is working, as is your browser.
In my experience, requests **is** sensitive to HTTP_PROXY:


#10001|marcus>export HTTP_PROXY=http://non-working.non-existing:9000/
#10002|marcus>uhd_images_downloader
Images destination:      /home/marcus/.usrlocal/share/uhd/images
Downloading images from: http://files.ettus.com/binaries/images/uhd-images_003.009.git-184-gf2337d6f.zip
Downloading images to:   /tmp/tmpb6Y7ec/uhd-images_003.009.git-184-gf2337d6f.zip
Downloader raised an unhandled exception: <urlopen error [Errno -2] Name or service not known>


but wget is **not**:

#10004|marcus>wget "http://files.ettus.com/binaries/images/uhd-images_003.009.git-184-gf2337d6f.zip"
--2015-10-21 16:44:36--  http://files.ettus.com/binaries/images/uhd-images_003.009.git-184-gf2337d6f.zip
Resolving files.ettus.com (files.ettus.com)... 173.203.35.196
Connecting to files.ettus.com (files.ettus.com)|173.203.35.196|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23692146 (23M) [application/zip]
Saving to: ‘uhd-images_003.009.git-184-gf2337d6f.zip’


However, wget is sensitive to (notice capitalization) http_proxy:

#10005|marcus>export http_proxy=$HTTP_PROXY
#10006|marcus>wget "http://files.ettus.com/binaries/images/uhd-images_003.009.git-184-gf2337d6f.zip"
--2015-10-21 16:47:02--  http://files.ettus.com/binaries/images/uhd-images_003.009.git-184-gf2337d6f.zip
Resolving non-working.non-existing (non-working.non-existing)... failed: Name or service not known.
wget: unable to resolve host address ‘non-working.non-existing’


That's why I'm asking about the literal variable Sumit exported; that's
bound to be a problem that'll come up more than once. By the way, I do
think the no-caps version is more "standard", but I'm not sure.

Best regards,
Marcus




More information about the USRP-users mailing list