ImportError: No module named items

391 views
Skip to first unread message

Alex Odin

unread,
Sep 9, 2016, 8:56:24 AM9/9/16
to scrapy-users
I have been googling for hours and all the solution won't help, can someone give me a hint what's wrong? Please

user@user~/PycharmProjects/scrap_doo/byubbot/tuts$ scrapy crawl SPY
Traceback (most recent call last):
  File "/usr/local/bin/scrapy", line 9, in <module>
    load_entry_point('Scrapy==1.1.2', 'console_scripts', 'scrapy')()
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/cmdline.py", line 141, in execute
    cmd.crawler_process = CrawlerProcess(settings)
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/crawler.py", line 238, in __init__
    super(CrawlerProcess, self).__init__(settings)
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/crawler.py", line 129, in __init__
    self.spider_loader = _get_spider_loader(settings)
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/crawler.py", line 325, in _get_spider_loader
    return loader_cls.from_settings(settings.frozencopy())
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/spiderloader.py", line 33, in from_settings
    return cls(settings)
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/spiderloader.py", line 20, in __init__
    self._load_all_spiders()
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/spiderloader.py", line 28, in _load_all_spiders
    for module in walk_modules(name):
  File "/usr/local/lib/python2.7/dist-packages/Scrapy-1.1.2-py2.7.egg/scrapy/utils/misc.py", line 71, in walk_modules
    submod = import_module(fullpath)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/user/PycharmProjects/scrap_doo/byubbot/tuts/spiders/byub_org.py", line 3, in <module>
    import items



Travis Leleu

unread,
Sep 9, 2016, 12:31:49 PM9/9/16
to scrapy-users
Will you post your spider file, and full stack dump into a gist and shoot the link out here?

--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scrapy-users+unsubscribe@googlegroups.com.
To post to this group, send email to scrapy...@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Erik Dominguez

unread,
Nov 4, 2016, 9:51:19 PM11/4/16
to scrapy-users
Try importing items from your byub_org.py like this:

from ..items import *# to import all of your items
from ..items import YourItemClass


Remember, generally you are importing your items from a folder below, if we assume you are importing them from your spiders file.
Reply all
Reply to author
Forward
0 new messages