algolia / algolia/docsearch-scraper
TypeError: argument of type 'NoneType' is not iterable
- Dominant language
- Python
- Stars
- 322
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
Hi there !
I am trying to run the command (I have no env file but env variables are set as global viariables in my terminal)
`docker run -it -e "CONFIG=$(cat algolia.config.json | jq -r tostring)" algolia/docsearch-scraper`
My error :
```
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/src/index.py", line 119, in
run_config(environ['CONFIG'])
File "/root/src/index.py", line 33, in run_config
config = ConfigLoader(config)
File "/root/src/config/config_loader.py", line 84, in __init__
self._parse()
File "/root/src/config/config_loader.py", line 120, in _parse
self.selectors = SelectorsParser().parse(self.selectors)
File "/root/src/config/selectors_parser.py", line 64, in parse
if 'lvl0' in config_selectors:
TypeError: argument of type 'NoneType' is not iterable
```
On my mac OS 11.3 :

Do you have any idea where it my come from ? Thanks a lot ! :)
Contributor guide
Research direction
Start with the reported docker run command and trace the CONFIG path through index.py, config/config_loader.py, and config/selectors_parser.py, especially SelectorsParser.parse at the failing line. Reproduce the traceback with the provided configuration, then verify that valid configuration input no longer causes the NoneType error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100