How to run a Checkpoint in python

This article is for comments to:

Please comment +1 if this How to is important to you.

on Windows I get an error when generating the python script this way.

  File "", line 31
    context = DataContext("C:\***\***\***\ge_example\great_expectations")
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

i resolved by changing the line 31 from:

context = DataContext("C:\***\ge_example\great_expectations")

to adding the r:

context = DataContext(r"C:\***\ge_example\great_expectations")

this is because without the r windows thinks that the letter after \ is a special character.
Should be a easy fix.

1 Like