What means this Error when running a script in python??
Entering edit mode
10 weeks ago
Ant • 0

Hello guys, I'm very new in bioinformatics and I'm trying to run a RNA-Seq analysis workflow that is made based on miniconda environment and has a main.py script to follow.

I'm doing this analysis in a remote shared shell linux server, but keeping get this error and I don't know what to do to revolve since looks like the problem is in the yaml package?

(rasflow) [xxxxxx@headnode0 RASflow-master]$ python main.py
Traceback (most recent call last):
File "main.py", line 8, in <module>
    config = yaml.load(yamlfile)
  File "/usr/lib64/python3.6/site-packages/yaml/__init__.py", line 72, in load
    return loader.get_single_data()
  File "/usr/lib64/python3.6/site-packages/yaml/constructor.py", line 35, in get_single_data
    node = self.get_single_node()
  File "/usr/lib64/python3.6/site-packages/yaml/composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "/usr/lib64/python3.6/site-packages/yaml/composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
File "/usr/lib64/python3.6/site-packages/yaml/composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/usr/lib64/python3.6/site-packages/yaml/composer.py", line 133, in compose_mapping_node
    item_value = self.compose_node(node, item_key)
  File "/usr/lib64/python3.6/site-packages/yaml/composer.py", line 64, in compose_node
    if self.check_event(AliasEvent):
  File "/usr/lib64/python3.6/site-packages/yaml/parser.py", line 98, in check_event
    self.current_event = self.state()
  File "/usr/lib64/python3.6/site-packages/yaml/parser.py", line 449, in parse_block_mapping_value
    if not self.check_token(KeyToken, ValueToken, BlockEndToken):
  File "/usr/lib64/python3.6/site-packages/yaml/scanner.py", line 115, in check_token
    while self.need_more_tokens():
  File "/usr/lib64/python3.6/site-packages/yaml/scanner.py", line 149, in need_more_tokens
  File "/usr/lib64/python3.6/site-packages/yaml/scanner.py", line 289, in stale_possible_simple_keys
    "could not find expected ':'", self.get_mark()) 
yaml.scanner.ScannerError: while scanning a simple key
  in "configs/config_main.yaml", line 29, column 1
could not find expected ':'
  in "configs/config_main.yaml", line 31, column 1

What am I suppose to do to resolve this? All the help would be great! Thank you

python3 yaml conda linux python • 309 views
Entering edit mode

Please format your code properly the next time. I've seen people use wrong formatting options to a reasonable extent, but your formatting was so messed up that it looked like it was intentionally vandalized. Please be more careful

Entering edit mode
10 weeks ago
 in "configs/config_main.yaml", line 29, column 1
could not find expected ':'

the message is quite clear to me : There is missing colon line 29-31 of configs/config_main.yaml

Entering edit mode

Thank you Pierre! It wasn't clear for me at all lol Trully thank you


Login before adding your answer.

Traffic: 2743 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6