i have installed scrapy on my windows 7 machine in a virtualenv called scrapy. scrapy startproject works and i made the tutorial from scrapy docs.
if i run
scrapy crawl dmoz
i get following error message:
File "C:\Users\mac\pystuff\scrapy\lib\site-packages\scrapy\utils\misc.py", line 42,in load_object
raise ImportError("Error loading object '%s': %s" % (path, e))
ImportError: Error loading object'scrapy.core.downloader.handlers.s3.S3DownloadHandler': DLL load failed: Could not find the specified module.
TESTS:
python console:
>>> import scrapy
>>> scrapy
>>> <module 'scrapy' from 'C:\Users\mac\pystuff\scrapy\lib\site-packages\scrapy\__init__.pyc'>
scrapy is available
powershell:
PS C: python -m pydoc scrapy.core.downloader.handlers
output:
NAME
scrapy.core.downloader.handlers - Download handlers for different schemes
FILE
c:\users\mac\pystuff\scrapy\lib\site- packages\scrapy\core\downloader\handlers\__init__.py
PACKAGE CONTENTS
file
ftp
http
http10
http11
s3
CLASSES
.
.
.
all other modules except s3 show the correct pydoc. for example: python -m pydoc scrapy.core.downloader.handlers.file
only s3 gives the import error:
PS C: python -m pydoc scrapy.core.downloader.handlers.s3
PS C: python -m pydoc scrapy.core.downloader.handlers.s3.S3DownloadHandler
output:
problem in scrapy.core.downloader.handlers.s3 - <type 'exceptions.ImportError'>: DLL load failed: Could not find the specified module.
New in version 2.4.0. When a setting references a callable object to be imported by Scrapy, such as a class or a function, there are two different ways you can specify that object: from mybot.pipelines.validate import ValidateMyItem ITEM_PIPELINES = { # passing the classname...
The project settings module is the standard configuration file for your Scrapy project, it’s where most of your custom settings will be populated. For a standard Scrapy project, this means you’ll be adding or changing the settings in the settings.py file created for your project. 4. Default settings per-command
Default settings per-command Each Scrapy tool command can have its own default settings, which override the global default settings. Those custom command settings are specified in the default_settings attribute of the command class. 5. Default global settings
While the sum of the sizes of all responses being processed is above this value, Scrapy does not process new requests. A dict containing the spider contracts enabled in your project, used for testing spiders. For more info see Spiders Contracts. A dict containing the Scrapy contracts enabled by default in Scrapy.
pywin32 was problem package. i ve tried to import it in python console and it could not be found. i copy these 3 packages from C:(yourpythonpath)\Lib\site-packages\pywin32_system32\ to C:(yourpythonpath)\Lib\site-packages\win32\
that solved the problem!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With