what could be the root cause for an error like thi...
# ask-metaflow
h
what could be the root cause for an error like this: <_io.TextIOWrapper name=‘sql/bla.sql’ mode=‘r’ encoding=‘UTF-8’> Cannot pickle artifact I tried to run: python AmazingFlow.py --environment=conda --package-suffixes .sql run --with batch
1
f
@happy-wolf-7852 how are you reading in the sql file?
h
like in THE metaflow book:
thanks - using: @step def MyStep(self): with open(‘sql/bla.sql’, ‘r’) as file: self.query = file.read() is better - obv. run in utility module.
f
and you get the pickle serialization error w that?
that should def work, only thing that I could think of would be the relative path thing that Ville mentions in that section of the book. If you're able to run that line of python from the directory you're running the flow you should be gtg
h
no sorry - no pickle error with that so all good …