Start a new topic
Answered

ValueError: dictionary update sequence element #0 has length 1; 2 is required

Hi. I am doing shub deploy and it throws me this: 

 shub deploy
Traceback (most recent call last):
  File "c:\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Anaconda3\Scripts\shub.exe\__main__.py", line 9, in <module>
  File "c:\anaconda3\lib\site-packages\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\anaconda3\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\anaconda3\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\anaconda3\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\anaconda3\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\anaconda3\lib\site-packages\shub\deploy.py", line 76, in cli
    conf, image = load_shub_config(), None
  File "c:\anaconda3\lib\site-packages\shub\config.py", line 479, in load_shub_config
    conf.load_file(closest_sh_yml)
  File "c:\anaconda3\lib\site-packages\shub\config.py", line 131, in load_file
    self.load(f)
  File "c:\anaconda3\lib\site-packages\shub\config.py", line 85, in load
    option_conf.update(yaml_option_conf)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

  What is going on and how to fix it?


Best Answer
Apparently there was a hidden character in my yaml. I wrote the yml by hand and it started to work.

Could you please show the content of your yml file?


1 person likes this

It seems I have the same problem. My file content:

project: 376294

stacks: scrapy:1.6-py3



1 person likes this
Answer
Apparently there was a hidden character in my yaml. I wrote the yml by hand and it started to work.

This is the error log:

 

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/shub", line 10, in <module>
    sys.exit(cli())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shub/deploy.py", line 76, in cli
    conf, image = load_shub_config(), None
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shub/config.py", line 481, in load_shub_config
    conf.load_file(closest_sh_yml)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shub/config.py", line 133, in load_file
    self.load(f)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shub/config.py", line 87, in load
    option_conf.update(yaml_option_conf)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

 

Login to post a comment