Comments (6)
Can you please show the code for def _crawler_Stop() ? And also my imagePipeline and deltafetch middleware are also not working??
from crochet.
Solved The Issue Thanks i was passing Crawlrunner object as Parameter, as the function stop. The Object gets destroyed. This leads to Stop Iteration Error I guess
from crochet.
Hi, i have the same error occuring when i run a spider within a flask app but i don't get a response from the spider
i am using flask, crochet(1.12.0), scrapyd, twisted(19.10.0)
from crochet.
Solved The Issue Thanks i was passing Crawlrunner object as Parameter, as the function stop. The Object gets destroyed. This leads to Stop Iteration Error I guess
I am using the same method and facing same issue.
how did you resolve it. any help would be great
from crochet.
Hello my brother I have the same issue.
from crochet.
The Reactor Code look like this, which call upon GeneralSpider which fetches all the necessary data based on the pk as primary key.
runner = CrawlerRunner()
output = []
@run_in_reactor
def scraped_by_id(pk):
global runner
dispatcher.connect(_crawler_result, signal=signals.item_scraped)
eventual = runner.crawl(GeneralSpider, id=pk)
dispatcher.connect(_crawler_Stop, signals.engine_stopped)
return eventual
def _crawler_result(item, response, spider):
global output_data
output_data.append(dict(item))
def _crawler_Stop():
# Perform any operation which is relevant to your application, like notify user
pass
And my GeneralSpider class look like this. Where Job contains info like url to scrape, fields to scrape, etc.
class GeneralSpider(scrapy.Spider):
def __init__(self, id, **kwargs):
self.id = id
self.custom_settings = {"LOG_LEVEL": "DEBUG"}
job = Job.objects.get(pk=id)
Hope this helps @MarwaKH29 @HimavarshaVS @dzhen19
from crochet.
Related Issues (20)
- Document difference from async/await
- Add github starring thing to docs
- Error using "run_in_reactor" in 1.8.0 that worked well in 1.7.0 HOT 5
- Python 3.7 support
- Someday, switch to Python's SimpleQueue instead of reactor-based queue HOT 1
- Python 3.8 support
- Use os.register_at_fork to make crochet work better with e.g. multiprocessing HOT 2
- i586-only test failures on openSUSE HOT 3
- Add coroutine support HOT 3
- threading.Thread.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10 HOT 1
- Switch to GitHub Actions
- Drop Python 2.7, 3.5, add Python 3.9
- Inability to detect partial async functions in Python < 3.8 HOT 1
- In async/await part of documentation, link to Django APIs HOT 1
- mypy plugin and coroutines HOT 12
- Replace deprecated imp module with importlib HOT 2
- 2.0.0: pytest is failing in 3 units HOT 3
- Automated uploads to PyPI
- Add .readthedocs.yaml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crochet.