Cannot open database because the directory does not exist
atx-barnes opened this issue · 3 comments
Hello Szymon!
So I just installed everything and configured my Pinterest login creds using archivist config
etc. but every time I run the archivist fetch
I get the error shown below.
[archivist-pinterest-crawl] fetching error TypeError: Cannot open database because the directory does not exist
Here is my Pinterest account https://www.pinterest.com/atxbarnes which should be public.
Any ideas?
Thanks
Hey, do you get any other errors or is that it?
Do you have a directory ~/Library/Application Support/archivist-pinterest-nodejs
? If not, try creating it (it should be created automatically though!)
So I did create that directory and it seemed to work up until this part:
[archivist-pinterest-crawl] all pins: 34 / new pins: 34 / removed pins: 0
[archivist-pinterest-crawl] crawling pin https://www.pinterest.com/pin/745064332084879085/
[archivist-pinterest-crawl] crawling pin https://www.pinterest.com/pin/745064332084085413/
[archivist-pinterest-crawl] crawling pin https://www.pinterest.com/pin/745064332084085395/
[archivist-pinterest-crawl] crawling pin https://www.pinterest.com/pin/745064332084084279/ <----- Last one before timeout error
Then threw this timneout error 4 times (1 - 4 rejection id's):
(node:43376) UnhandledPromiseRejectionWarning: TimeoutError: Navigation timeout of 30000 ms exceeded
at /usr/local/lib/node_modules/archivist-pinterest-crawl/node_modules/puppeteer/lib/LifecycleWatcher.js:100:111
-- ASYNC --
at Frame.<anonymous> (/usr/local/lib/node_modules/archivist-pinterest-crawl/node_modules/puppeteer/lib/helper.js:94:19)
at Page.goto (/usr/local/lib/node_modules/archivist-pinterest-crawl/node_modules/puppeteer/lib/Page.js:485:53)
at Page.<anonymous> (/usr/local/lib/node_modules/archivist-pinterest-crawl/node_modules/puppeteer/lib/helper.js:95:27)
at crawlPin (/usr/local/lib/node_modules/archivist-pinterest-crawl/fetch/crawler.js:17:14)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:43376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Any ideas?
Hm, I can try sprinkling in some error handling around that code path, but I never seen it fail with timeout on a pin.
Maybe try again on a different/faster network if possible?