CONFIG is not a valid JSON
martavis opened this issue · 1 comments
martavis commented
I'm trying to run the docker image copied directly from the docs and I'm getting the CONFIG is not a valid JSON
error. This is what I'm running:
docker run -it --env-file=.env -e "CONFIG=$(cat algolia-config.json | jq -r tostring)" algolia/docsearch-scraper
where algolia-config.json
is at the root of my project. I tried pulling out the cat algolia-config.json | jq -r tostring
part and running it separately, which worked. Also, here is my project folder structure:
and my config file:
{
"index_name": "answers",
"start_urls": ["https://answers.alpha.equityforhire.com"],
"stop_urls": [],
"selectors": {
"lvl0": "main article header h1",
"lvl1": "main article h2",
"lvl2": "main article h3",
"lvl3": "main article h4",
"lvl4": "main article h5",
"lvl5": "main article h6",
"text": "main article p,main article ul,main article table,main article blockquote,main article dl,main article ol"
}
}
Is there anything I'm doing wrong? I was able to run this about 2 months ago with the same settings.
martavis commented
Running the command in Windows requires running in Git Bash.