We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yaml code:
name: "something" posessions: - bar - Towel - Foo
python code:
from strictyaml import load, Map, Str, Int, Seq, YAMLError with open("my-data.yaml", "r") as stream: try: data = load(stream) print(data) except YAMLError as error: print(error)
Executing this code incorrectly prints an error about the colon:
File "data.yaml", line 2 posessions: ^ SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered:
You are trying to run the YAML file with the python interpreter, not the python code.
Sorry, something went wrong.
Can you add code examples to the README please?
I don't hardly ever use python other than in google colab 😅
@crdoconnor what is the python code way to do this?
If that file is called "mycode.py" you run "python mycode.py".
No branches or pull requests
yaml code:
python code:
Executing this code incorrectly prints an error about the colon:
File "data.yaml", line 2 posessions: ^ SyntaxError: invalid syntax
The text was updated successfully, but these errors were encountered: