Preprocessed saving error

In my make test-submission I’m able to access files I store in the src_dir as deposited through my zip. But when I try saving a file in the preprocess function by a similar method, I get file pointer error. Any suggestions?

Traceback (most recent call last):
File “/code_execution/supervisor.py”, line 114, in
main()
File “/code_execution/supervisor.py”, line 52, in main
assets = src.solution.preprocess(
File “/code_execution/src/solution.py”, line 361, in preprocess
with open(preprocessed_dir.joinpath(f"{fd}train_past_data{col}.pkl"), ‘rb’) as handle:
FileNotFoundError: [Errno 2] No such file or directory: ‘/code_execution/preprocessed/01-01_train_past_data_volume_hungry_horse_reservoir_inflow.pkl’

Hi @scottmreed,

From the stack trace, it looks like you’re trying to write to a file that you opened in read mode—rb is “read binary”.