title: scrapy AttributeError: Response content isn't text
body: <p>Hi I have setup the following project</p>
  <pre><code>class DatosRUC_(scrapy.Spider):
      name = &quot;datosRUC&quot;
      start_urls = ['https://www.datosperu.org/']
  
      def start_requests(self):
          nombre = &quot;datosRUC&quot;
          rucs = [20100050359,
                  20536742248
                  ]
          for i in rucs:
              print(i)
              req = scrapy.Request(url='https://www.datosperu.org/buscador_empresas.php?buscar='+str(i))
              yield req
  
  def parse(self, response):
      error = 'no_error'
      s = BeautifulSoup(response.text,'html.parser')
      ruc_num = s.find('input', {'id': 'buscar'}).get('value')
      company_link = s.findAll('div',class_=&quot;single-product&quot;)
      if len(company_link)&gt;0:
          url_company= company_link[0].find('a',href=True)['href']
          url_final = 'https://www.datosperu.org/' + url_empresa
          yield {'ruc':ruc_num,'ruc_link':url_final,'error':error}
      else:
          error = 'no_ruc_found'
          url_final = ''
          yield {'ruc':ruc_num,'ruc_link':url_final,'error':error}
  </code></pre>
  <p>However if I send a Request to one of the links I get the following error (ex.):</p>
  <pre><code>2020-10-15 11:01:08 [scrapy.core.scraper] ERROR: Error downloading &lt;GET https://www.datosperu.org/buscador_empresas.php?buscar=20536742248&gt;
  ...
  AttributeError: Response content isn't text
  ...
  </code></pre>
  <p>I'm using a proxy pool, but I don't think that could be the reason, because I have tried other links from another website without any problem.</p>
  <p>I have tried to debug it with scrapy-shell but when I send (ex.):</p>
  <pre><code>fetch(https://www.datosperu.org/buscador_empresas.php?buscar=20536742248)
  </code></pre>
  <p>I get the same error</p>