3
votes

I have to run basic tutorial on the Scrapy architecture Win32.

When I try scrapy crawl dmoz, shows me the following error:

File "C:\Python27\lib\site-packages\scrapy\utils\misc.py", line 40, 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.

The Python version is 2.7, 32 bit on Win 32.

I have installed the following (as Platform specific installation notes):

  • pywin32-218.win32-py2.7.exe

  • Twisted-13.1.0.win32-py2.7.exe

  • zope.interface-4.0.5.win32-py2.7.exe

  • lxml-3.2.3.win32-py2.7.exe

  • pyOpenSSL-0.11.winxp32-py2.7.exe

I had the easy_install then through it installed pip, and then I did:

pip install Scrapy

I just made a change. I installed Zope .exe as above, then I did not like:

zope.interface: zope.interface download the egg from pypi page and install it by running easy_install file.egg

Could this be the problem?

2
open python in a terminal and type: import scrapy. Does that throw an error?kelorek
It sounds like scrapy thinks you have boto installed, but you don't. (I believe it's an optional dependency, that will get used if you have it, but skipped if you don't.) You could try to debug why it got confused… or you could just install boto first, then reinstall scrapy and see if that fixes the problem.abarnert
@kerolek Does the import, and does not throw errors.raul
I've installed scrapy on XP, installing zope using the Windows installer and it was fine. I don't think that is causing the issue.Talvalin
Or try reinstalling pywin32, which is where win32api comes from. But first, try the twisted and win32api imports yourself, just to make sure the problem is consistent and you're not just chasing random packages on a wild goose chase… (PS, hunting down import problems with C extension modules in Python 2.x sucks; in 3.2+ it's usually a lot nicer… I know I'm not going to convince you to switch to 3.x just for that, but one more straw on the camel's back never hurt.)abarnert

2 Answers

1
votes

Installing pywin32 solved the problem for me, It can be downloaded from: http://sourceforge.net/projects/pywin32/

0
votes

I met the same problem. I checked almost all the possible packages and update them to 64-bit. Didn't work. Magical thing happened when I install a 32-bit pywin32. Everything just clicked. I've no idea why. Hope it will help...