Open cmaumet opened 7 years ago
@dbkeator, @cmaumet, @satra : There now seems to be a problem accessing the NIDM-Results JSON-LD context file as an error is now appearing when I run refresh.py that references that file. The error seems to have something to do with the Name on the SSL certificate, not matching. The salient part is : (Caused by SSLError(CertificateError("hostname 'raw.githubusercontent.com' doesn't match u'www.github.com) but here is the full error traceback:
/home/karl/Work/packages/anaconda3/envs/nidm/lib/python2.7/site-packages/urllib3/connection.py:395: SubjectAltNameWarning: Certificate for purl.org has no
subjectAltName, falling back to check for a
commonNamefor now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.) SubjectAltNameWarning, /home/karl/Work/packages/anaconda3/envs/nidm/lib/python2.7/site-packages/urllib3/connection.py:395: SubjectAltNameWarning: Certificate for raw.githubusercontent.com has no
subjectAltName, falling back to check for a
commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
SubjectAltNameWarning,
Traceback (most recent call last):
File "scripts/refresh.py", line 55, in
Interesting. The context file URL resolves to the correct file, so it looks like it really is an error related to the cert.
@khelm : I've shared the details for the purl login with you by email.
@maumet I originally thought that the link you sent me was the issue since purl does use Let's Encrypt for it's certificates. I downloaded an updated cacert.pem file and pointed to that in my .bashrc file, but still got the same error. However, I now think it has to do with the version of requests or urllib3 that is called by jsonld.py. It's a little hard to tell which is the problem - or both - since the warning at the top of the error is from urllib3 and the error at the bottom is from requests. Unfortunately, due to the way that they are called - from within jsonld.py I can't add the flag to not check the certificate without modifying the actual module code. Upgrading urllib3 doesn't fix the error, but does raise a warning saying that the version is past what nidmresults has specified and upgrading requests gives a different error, again in a package that shouldn't be modified. I also created a new conda environment and installed nidmresults into that, but got different errors. Part of the issue, I think, is the use of python 2.7. Commented out the lines in refresh.py to resolve this and will check for any errors on the website that this causes. Since this python 2.7 code is getting harder to work with as these errors occur, I will pursue splitting off the new work we're doing with NIDM-Experiment into a separate repo, since we now have new terms webpages and will soon have a term graph map.
As suggested by @satra, it would be nice to create a JSON-LD context file listing our preferred prefixes available in https://github.com/incf-nidash/nidm/blob/master/nidm/nidm-results/terms/prefixes.csv.
This context file could then be imported by any NIDM-Results JSON-LD document.
We would need:
scripts/refresh.py
to trigger this function as part of the tests to make sure it is run after each update.Here is an example of JSON-LD context file: https://json-ld.org/contexts/person.jsonld