> On 7 Feb 2015, at 10:18 pm, Thomas Caswell <tcasw...@gmail.com> wrote:
> 
>     raise ValueError(msg % style)
> ValueError: 'https://gist.github.com/adrn/6590261/raw' not found in the style 
> library and input is not a valid URL or path. See `style.available` for list 
> of available styles.
> 
> Is your computer connected to the internet? Can you get to that url in any 
> other way?  This works on my machine and on the travis (both linux and osx 
> https://travis-ci.org/MacPython/scipy-stack-osx-testing). Unfortunately the 
> code currently  snarfs all exceptions so this makes it hard to sort out what 
> exactly is going wrong.
>  
Yes, the "not found in the style library and input is not a valid URL or path” 
message is not exactly
clear about that. Both with lynx and wget I am getting a warning about an 
invalid ssl certificate for
that URL, so I need to explicitly override it or use ‘wget 
—no-check-certificate’. Curl seems to have
some issues of its own, does not download the raw file anyway, though silently 
unless given ‘-v':
> curl -v -O https://gist.github.com/adrn/6590261/raw                           
>                                                                      
* Hostname was NOT found in DNS cache
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* 
  Trying 192.30.252.143...
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0* 
Connected to gist.github.com (192.30.252.143) port 443 (#0)
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0* 
TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
* Server certificate: *.github.com
* Server certificate: DigiCert SHA2 High Assurance Server CA
* Server certificate: DigiCert High Assurance EV Root CA
> GET /adrn/6590261/raw HTTP/1.1
> User-Agent: curl/7.37.1
> Host: gist.github.com
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Content-length: 0
< Location: https://gist.githubusercontent.com/adrn/6590261/raw
< Connection: close
< 
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
* Closing connection 0


> wget https://gist.github.com/adrn/6590261/raw                                 
>                                                                      
--2015-02-09 01:38:16--  https://gist.github.com/adrn/6590261/raw
Resolving gist.github.com (gist.github.com)... 192.30.252.143
Connecting to gist.github.com (gist.github.com)|192.30.252.143|:443... 
connected.
ERROR: cannot verify gist.github.com's certificate, issued by ‘/C=US/O=DigiCert 
Inc/OU=www.digicert.com/CN=DigiCert SHA2 High Assurance Server CA’:
  Unable to locally verify the issuer's authority.
To connect to gist.github.com insecurely, use `--no-check-certificate’.

I don’t know if this is only due to something peculiar with my proxy or cache 
settings, but the mpl error
comes down to python2.7’s urllib rejecting this certificate
>>> from urllib2 import urlopen
>>> fp = urlopen('https://gist.github.com/adrn/6590261/raw')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sw/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/sw/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/sw/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/sw/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/sw/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/sw/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed (_ssl.c:581)>

(even when using ‘http://...' in the URL), while python3.4 urllib apparently 
has no problems with it:
>>> from urllib.request import urlopen
>>> fp = urlopen('https://gist.github.com/adrn/6590261/raw')
>>> fp
<http.client.HTTPResponse object at 0x10c782a90>
>>> fp.read()
b'axes.facecolor      : adeade’

MacOS X’s own /usr/bin/python (2.7.6) works as well, and Safari displays that 
URL as encrypted with a trusted
certificate from DigiCert SHA2 High Assurance Server CA.
An obvious suspect would be the latter two using Mac OS X’s system ssl, which 
is OpenSSL 0.9.8za, while
lynx, wget and fink python all use fink’s OpenSSL 1.0.2; on a Linux machine 
with OpenSSL 1.0.1e wget and
python2.7 can resolve the URL as well (though curl doesn’t download anything 
there either).
But Fink’s python3.4 is using the same OpenSSL 1.0.2 as it’s python2.7, and 
accepts the certificate as well!
Anyway this is obviously not a matplotlib problem.

> On 10.10 there are a number of additional errors (I’ve checked the 
> save_animation
> errors are not due to permission problems):
> 
> ERROR: 
> matplotlib.tests.test_animation.test_save_animation_smoketest('ffmpeg', 'mp4')
> ----------------------------------------------------------------------
...
>  To be clear, this fails on some versions of osx and not others?  Can you 
> track this back any further to sort out what is going on?  I don't have a mac 
> to do any testing on.
> 
OK, I could track this down to a broken ffmpeg on the 10.10 machine, which I 
did not bother to check earlier,
because I had used ffmpeg on that same machine only 2 weeks ago. But another 
library update in between
broke a compatibility version; after rebuilding ffmpeg those tests are passing 
now.

> 
> ======================================================================
> ERROR: Failure: AttributeError ('module' object has no attribute 
> 'test_backend_qt4')
> FAILED (KNOWNFAIL=372, SKIP=1, errors=7)
> 
>  The bunch of these look like something is very broken about the 
> installation.  AttributeErrors like that tend to mean that something in the 
> imports of those test modules errors (and nose eats those errors).
> 
Unfortunately yes, the actual error was a failing ‘import mock’, so the mock 
package just needs to be added to
the test dependencies for the python2.7 flavour. With it installed, those 4 
above pass as well, so I seem to be left
with only the openssl problem.

Thanks for the assistance!

                                        Derek



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to