webread error 122 - after it has already worked

4 views (last 30 days)
here is the relevent part of my code:
for i= (1:length(ralstonia_uncharacterized_idx));
if matrix_ralstonia(i)==1;
formatspec = 'https://www.UniProtKB.org/uniprot/%s.xml';
A1 = raw_ralstonia.ID{i};
url= sprintf(formatspec, A1);
o = weboptions('CertificateFilename','');
xml = webread(url,o);
%finding the general vicinity of name
expression = '<fullName evidence.*</fullName>';
gene_name_raw = regexp(xml, expression, 'match');
% focusing on the name
focused = '>.*<';
gene_name = regexp(gene_name_raw, focused, 'match');
raw_ralstonia.gene{i} = char(string(gene_name));
it has worked for many times, and now after a week I attended some other things I tried this again and it gives me the error massage:
Error using webread (line 122)
I didn't change a thing, and worked through the same terminal. I tried in other url's in another site, and the same error massage prompts.
thanks in advance...

Answers (1)

Rashed Mohammed
Rashed Mohammed on 3 Nov 2020
Hi Chaim
It seems like the domain name in the URL is not in use any longer. You can change the URL to https://uniprot.org/uniprot/A0A0J9DKQ4.xml and use the webread function.
Hope this helps !
chaim giladi
chaim giladi on 3 Nov 2020
funny... now it worked, thank you!
but it happened too with a lot of other webreads and commands to the web, like in blast (blastncbi), even when I tried just copying code that worked for another guy. maybe I'll be able to come later with a better verse of my problem, after I deal further with blast.
chaim giladi
chaim giladi on 3 Nov 2020
so now to the problem with blastncbi:
this one (just copied from a code that worked) doesn't work for me:
%Blast the inputted sequence against NCBI protein. Return 5000 results.
[blastsend, waittime]=blastncbi(POI, 'blastp', 'MaxNumberSequences', 5000);
and the error massage is:
Error using webread (line 122)
Secure connection to
not established because "error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none". Check your system certificates for expired, missing, or invalid certificates.
Error in blastncbi (line 184)
s = webread([site commandPut blastUrlString]);
so I see it uses webread, and I gather the problem is that here I can't add the part which exempts me from certification
o = weboptions('CertificateFilename','');
xml = webread(url,o);
how could this be tackled?

Sign in to comment.


Find more on Programming in Help Center and File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!