[USRP-users] Reg : Image Downloader

Neel Pandeya neel.pandeya at ettus.com
Wed Oct 21 11:30:27 EDT 2015


Maybe this is a rare case of a lower-case environment variable? $HTTP_PROXY
doesn't work, but $http_proxy works?

Just digging around, I found the following:
http://askubuntu.com/questions/228530/updating-http-proxy-environment-variable
http://unix.stackexchange.com/questions/212894/whats-the-right-format-for-the-http-proxy-environment-variable-caps-or-no-ca
http://superuser.com/questions/876100/https-proxy-vs-https-proxy




On 21 October 2015 at 07:49, Marcus Müller <marcus.mueller at ettus.com> wrote:

> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20151021/176757f9/attachment-0002.html>


More information about the USRP-users mailing list