1

I can run my scrapy locally without any issues, however, when i try to run job from scrapinghub i get the following error (connecting to mongo atlas cloud):

exceptions.ImportError: No module named pymodm

I import using:

import pymodm

Any help is much appreciated.

Cheers

Evhz
  • 8,852
  • 9
  • 51
  • 69
Rodrigo Rubio
  • 1,686
  • 2
  • 16
  • 26

1 Answers1

6

Create a file named scrapinghub.yml in your project's main folder with following contents.

projects:
  default: 111149
requirements:
  file: requirements.txt

Where 111149 is my proejct ID on scrapinghub.

Create another file named requirements.txt in same directory.

and put your required modules along with the version number you are using in that file like so,

MySQL-python==1.2.5

PS: I was using MySQLDB module so I put that.

Umair Ayub
  • 19,358
  • 14
  • 72
  • 146
  • do you know what the setting about mongodb ? I have the same issue but still can't figure it out now. https://stackoverflow.com/questions/47117975/dependency-error-while-trying-to-run-project-on-scrapy-cloud – Morton Nov 05 '17 at 06:22