-3

Why is the invalid syntax and how can I actually fix this? I have

import sys
import yaml
import threading
import argparse
from math import pi

And later on I have

with args.config as f:
    config - yaml.load(f)

However every time I try to run it it throws up the error that args is invalid syntax. Please tell me, what can I do?

STKN
  • 1

1 Answers1

0

like @Dani says: change:

with args.config as f:
    config - yaml.load(f)

to

with args.config as f:
    config = yaml.load(f)
  • @xnx I suspect (and just guessing until the OP bothers clarifying) that "invalid syntax" is something being thrown from the `yaml` library... `config - yaml.load(f)` isn't a `SyntaxError` (but definitely not what's intended though)... – Jon Clements Jan 10 '15 at 12:30