Does anyone know how to solve this error? I have never seen this error before and my current script has been working fine up until this point.

     > t2g <- biomaRt::getBM(
     +   attributes = c("ensembl_transcript_id", "transcript_version",
     +                  "ensembl_gene_id", "external_gene_name", "description",
     +                  "transcript_biotype"), mart = mart)
     No encoding supplied: defaulting to UTF-8.
     Error in biomaRt::getBM(attributes = c("ensembl_transcript_id", "transcript_version",  : 
     The query to the BioMart webservice returned an invalid result: biomaRt expected 
     a character string of length 1. Please report this to the mailing list.
For me the Ensembl mirror sites are down.&nbsp; It looks like you&#39;re US based, so by default you&#39;ll get redirected to [uswest.ensembl.org](http://uswest.ensembl.org/biomart/martview?redirect=no) or [useast.ensembl.org](http://useast.ensembl.org/biomart/martview?redirect=no), neither of which are working for me at the moment.

The main site is working so you want to use [www.ensembl.org][1] as your host.  However you also have to supply the argument `ensemblRedirect = FALSE`, otherwise their internal redirection will simply send you back to your local site.  This works for me, even if I&#39;m using a server based in Texas:

    mart <- useMart(biomart = "ENSEMBL_MART_ENSEMBL", 
                    dataset = "hsapiens_gene_ensembl", 
                    host = 'www.ensembl.org',
                    ensemblRedirect = FALSE)

After some discussion with the Ensembl BioMart team the plan going forward is to remove the redirection entirely when using **biomaRt**, so this should no longer be an issue, and you'll go to whatever address you've provided.  I'll try to update here when that's been done.

----------

The 'No Encoding Supplied' message is a red herring relating to the content being returned by the server - you see it whether there's a problem or not.  I've already addressed this in the developmental version of **biomaRt**, and will update the release version too.  It's not very helpful to end users!

  [1]: http://www.ensembl.org?redirect=no