title: scrapy KeyError: 'Spider not found
body: <p>I wrote this project on my MacBook and it worked fine.But when i upload the project to my linux server that runs ubuntu16, it did't work out.</p>
  
  <p>Here is the error I'm getting</p>
  
  <pre><code>2017-02-22 15:09:53 [scrapy.utils.log] INFO: Overridden settings: {'NEWSPIDER_MODULE': 'Lagou.spiders', 'ROBOTSTXT_OBEY': True, 'SPIDER_MODULES': ['Lagou.spiders'], 'BOT_NAME': 'Lagou', 'AUTOTHROTTLE_ENABLED': True, 'DOWNLOAD_DELAY': 3}
  Traceback (most recent call last):
    File "/usr/local/bin/scrapy", line 11, in &lt;module&gt;
      sys.exit(execute())
    File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 142, in execute
      _run_print_help(parser, _run_command, cmd, args, opts)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 88, in _run_print_help
      func(*a, **kw)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/cmdline.py", line 149, in _run_command
      cmd.run(args, opts)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/commands/crawl.py", line 57, in run
      self.crawler_process.crawl(spname, **opts.spargs)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 162, in crawl
      crawler = self.create_crawler(crawler_or_spidercls)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 190, in create_crawler
      return self._create_crawler(crawler_or_spidercls)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/crawler.py", line 194, in _create_crawler
      spidercls = self.spider_loader.load(spidercls)
    File "/usr/local/lib/python2.7/dist-packages/scrapy/spiderloader.py", line 51, in load
      raise KeyError("Spider not found: {}".format(spider_name))
  KeyError: 'Spider not found: myspider'
  </code></pre>
  
  <hr>
  
  <blockquote>
    <p>ubuntu@VM-76-113-ubuntu:~$ tree</p>
  </blockquote>
  
  <pre><code>-- Lagou
      |-- Lagou
      |   |-- __init__.py
      |   |-- __init__.pyc
      |   |-- items.py
      |   |-- main.py
      |   |-- middlewares.py
      |   |-- pipelines.py
      |   |-- settings.py
      |   |-- settings.pyc
      |   |-- spiders
      |       |-- __init__.py
      |       |-- __init__.pyc
      |       |-- lagou_spider.py
      |       `-- lagou_spider.pyc
      -- scrapy.cfg
  </code></pre>
  
  <p>3 directories, 13 files</p>
  
  <hr>
  
  <p>job_spider.py</p>
  
  <pre><code>class LaGouSpider(Spider):
      name = "myspider"
      allowed_domains = ["https://www.lagou.com"]
      start_urls = ["https://www.lagou.com/zhaopin/"]
  </code></pre>
  
  <p>scrapy.cfg</p>
  
  <pre><code>[settings]
  default = LagouSpider.settings
  
  [deploy]
  #url = http://localhost:6800/
  project = LagouSpider
  </code></pre>
  
  <hr>
  
  <p>I sloved this problem by recreate the whole project and reupload it to the server.but i still don't know why it didn't work before, it's the same python environment and the code but it can run on my computer ,rise error on the server</p>