<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Grace,<div><br></div><div>I may have reproduced your problem. I'm assuming you downloaded the ensembl core API from this URL.</div><div><a href="http://www.ensembl.org/info/docs/api/api_installation.html">http://www.ensembl.org/info/docs/api/api_installation.html</a>. There is a link to download ensembl. The link url is</div><div><a href="http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar">http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar</a></div><div><br></div><div>I reproduce (partially) your error, by getting this API with a wget like this on the command line.<br><div><br></div><div>wget <a href="http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar">http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar</a></div><div><br></div><div>It happens that if you do it like that, without ' or " around the complete url, the shell cut the url for wget to digest. And when it does it,</div><div>the API it somehow downloads the latest branch which is v59.</div><div><br></div><div>Do a </div><div><br></div><div>grep API_VERSION /src/ensembl/modules/Bio/EnsEMBL/Registry.pm</div><div><br></div><div>and let us know what you get. In my case I get a line (among others)</div><div>my $API_VERSION = 59;</div><div><br></div><div>So to download the proper API (e.g.v58) with wget add ' or ", e.g.</div><div><br></div><div>wget "<a href="http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar">http://cvs.sanger.ac.uk/cgi-bin/viewvc.cgi/ensembl.tar.gz?root=ensembl&only_with_tag=branch-ensembl-58&view=tar</a>"</div><div><br></div><div>To debug such thing, use the -verbose in your script. That is how I got into the right direction to found what was going on, because</div><div>it was telling me the script was trying to load the v59 databases, that are not yet on ensembldb.ensembl.org</div><div><div>$registry->load_registry_from_db(</div><div>    -host => 'ensembldb.ensembl.org',</div><div>    -user => 'anonymous',</div><div>    -verbose => 1</div><div>    );</div></div><div><br></div><div>Hope this help and solve your problem. If not, I'm as stuck as you.</div><div><br></div><div>Cheers,</div><div><br></div><div>Abel</div></div><div><br></div><div><div>On 4 Aug 2010, at 18:37, Grace Cheng wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: arial, helvetica, sans-serif; font-size: 13pt; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I get 42 when I run the code you provided, however, I still can't run my script. Any other thing I could test for?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Grace<br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: arial, helvetica, sans-serif; font-size: 13pt; "><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: arial, helvetica, sans-serif; font-size: 13px; "><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold; ">寄件人﹕</span></b><span class="Apple-converted-space"> </span>Andy Yates <<a href="mailto:ayates@ebi.ac.uk">ayates@ebi.ac.uk</a>><br><b><span style="font-weight: bold; ">收件人﹕</span></b><span class="Apple-converted-space"> </span>Grace Cheng <<a href="mailto:himwo@yahoo.com.hk">himwo@yahoo.com.hk</a>><br><b><span style="font-weight: bold; ">副本(CC)</span></b><span class="Apple-converted-space"> </span>dev ensembl <<a href="mailto:dev@ensembl.org">dev@ensembl.org</a>><br><b><span style="font-weight: bold; ">傳送日期﹕</span></b><span class="Apple-converted-space"> </span>2010/8/4 (三) 9:41:14 PM<br><b><span style="font-weight: bold; ">主題:</span></b><span class="Apple-converted-space"> </span>Re: [ensembl-dev] Re: Can't connect to ensembl database<br></font><br>I would suggest prodding the DBI connection parameters in a separate call. The following will connect to EnsemblDB & will also raise an error if it cannot do the connection with some error information<br><br>use strict;<br>use warnings;<br>use DBI;<br>my $host ='ensembldb.ensembl.org';<br>my $port = 5306;<br>my $user = 'anonymous';<br>my $pass = undef;<br>my $dbh = DBI->connect( "DBI:mysql:host=$host;port=$port", $user, $pass ) or die $DBI::errstr;<span class="Apple-converted-space"> </span><br>warn $dbh->selectrow_array('select 42');<br>$dbh->disconnect();<br><br>If you get a warning saying 42 then this is fine; if not then post the DBI error back to the list.<br><br>Andy</div></div></div><br> _______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@ensembl.org">Dev@ensembl.org</a><br><a href="http://lists.ensembl.org/mailman/listinfo/dev">http://lists.ensembl.org/mailman/listinfo/dev</a><br></div></blockquote></div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 12px; "><div><span class="Apple-style-span" style="font-family: Courier; "><div><font class="Apple-style-span" color="#808080" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 13px; "><b style="color: rgb(128, 128, 128); font-family: Arial; font-size: 13.3px; font-weight: bold; ">__</b></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#808080" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 13px; "><b style="color: rgb(128, 128, 128); font-family: Arial; font-size: 13.3px; font-weight: bold; ">Abel Ureta-Vidal, PhD MBA</b></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#808080" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 13px; "><b>Eagle Genomics Ltd</b></span></font><span class="Apple-style-span" style="font-family: Arial; font-size: 13px; color: rgb(128, 128, 128); "> | E: <a href="mailto:abel@eaglegenomics.com">abel@eaglegenomics.com</a></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" color="#808080" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 13px; "><a href="http://www.eaglegenomics.com/">http://www.eaglegenomics.com</a></span></font></div></span></div></div> </div><br></body></html>