docsearch-scraper icon indicating copy to clipboard operation
docsearch-scraper copied to clipboard

TypeError: argument of type 'NoneType' is not iterable

Open christophemenager opened this issue 3 years ago • 2 comments

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 <module>
    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 : image

Do you have any idea where it my come from ? Thanks a lot ! :)

christophemenager avatar May 01 '21 08:05 christophemenager

me too

zenkiet avatar Oct 09 '21 07:10 zenkiet

@christophemenager @Zenfection1412 It happens when you don't have selectors defined in your config file. I just ran into the same thing.

jer-k avatar Mar 13 '22 00:03 jer-k