deep-jade•3y ago
How to clear named KeyStores before every run?
I have this function
It is the first thing that runs before I start my crawler. It works as expected and drops both of the keystores.
But when I try to write fresh data to these stores again with this code
I get this error
I was expecting it to create a new store if didn't exist, but for some reason it doesn't and I am kinda lost with this error.
Any help would be appreciated!
9 Replies
This looks like a bug, will report
If you could report an issue here and follow the steps, it would help a lot. Thank you
https://github.com/apify/crawlee/issues
GitHub
Issues · apify/crawlee
Crawlee—A web scraping and browser automation library for Node.js that helps you build reliable crawlers. Fast. - Issues · apify/crawlee
stormy-gold•3y ago
It doesn't seem to be a bug. Herewith an example that It works as expected
stormy-gold•3y ago
deep-jadeOP•3y ago
I should've mentioned it in the original post, I don't have a request handler inline, instead I am importing a router from a
routes.ts
file which looks like this
Then in the main.ts
I am setting it up like this
stormy-gold•3y ago
Another example that It works as expected with
PuppeteerRouter
.deep-jadeOP•3y ago
I'll test this with a new project and see if I can still reproduce it
@Vrockz just advanced to level 1! Thanks for your contributions! 🎉
@LeMoussel Thanks for helping!