1

I am using iPython with Scrapy shell inside a virtualenv, but I can't save my project's variables (they get deleted everytime I leave the project) and %store won't work, returning "Line magic function %store not found".

Currently, I have Python 2.7.12, iPython 5.7.0 and Scrapy 1.5.0, all working inside a virtualenv.

There are some questions here about similar errors, such as this one, but I could not find a solution regarding storemagic/persistence specifically. Maybe this issue I am facing has something to do with running it from a virtual environment?

I would like to add persistence to those variables, so they can later be called from a Scrapy spider. Reading the iPython documentation, I figured out storemagic was the way to do it, but it won't work for me inside Scrapy shell. Is there another way to do that?

I can't figure out what's going on, would appreciate some help. Thanks

reaction hashs
  • 51
  • 1
  • 1
  • 5
  • And other magics do work? – hpaulj Jun 23 '18 at 18:04
  • They do, not %store though. I am trying to call those variables from a Scrapy spider, but it won't recognize them saying they are not defined. Maybe an option is to save them in a CSV file or something like that? – reaction hashs Jun 24 '18 at 07:14
  • Can't figure out why %store is not working though... I am only running the whole thing from a virtualenv because it is the recommendation in the Scrapy documentation. – reaction hashs Jun 24 '18 at 07:17

0 Answers0