algolia / docsearch-scraper

DocSearch - Scraper

Home Page:https://docsearch.algolia.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: argument of type 'NoneType' is not iterable

christophemenager opened this issue · 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 ! :)

me too

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