title: TypeError: to_bytes must receive a unicode, str or bytes object, got set
body: <p>I use Scrapy to write spider,but i meet this error .Here is my code:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  import scrapy
  
  class ZhihuSpider(scrapy.Spider):
      name = "zhihu"
      allowed_domains = ["www.zhihu.com"]
  
      def start_requests(self):
          return [scrapy.Request('http://www.zhihu.com/#signin')]
  
      def parse(self, response):
          print response
  </code></pre>
  
  <p>the information of the error is:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 1183, in
  _inlineCallbacks
      result = result.throwExceptionIntoGenerator(g)
    File "C:\Python27\lib\site-packages\twisted\python\failure.py", line 389, in t
  hrowExceptionIntoGenerator
      return g.throw(self.type, self.value, self.tb)
    File "C:\Python27\lib\site-packages\scrapy\core\downloader\middleware.py", lin
  e 37, in process_request
      response = yield method(request=request, spider=spider)
    File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 587, in _
  runCallbacks
      current.result = callback(current.result, *args, **kw)
    File "C:\Python27\lib\site-packages\scrapy\downloadermiddlewares\robotstxt.py"
  , line 45, in process_request_2
      to_native_str(self._useragent), request.url):
    File "C:\Python27\lib\site-packages\scrapy\utils\python.py", line 127, in to_n
  ative_str
      return to_bytes(text, encoding, errors)
    File "C:\Python27\lib\site-packages\scrapy\utils\python.py", line 117, in to_b
  ytes
      'object, got %s' % type(text).__name__)
  TypeError: to_bytes must receive a unicode, str or bytes object, got set
  </code></pre>