Having a really stupid issue with my code I’ve tried debugging it multiple times but it does not seem to work. I’m basically getting the following on pushing app.py to a space
Traceback (most recent call last):
File "/home/user/app/app.py", line 7, in <module>
learn = load_learner(r'C:\Users\...\OneDrive\...\export.pkl')
File "/home/user/.local/lib/python3.10/site-packages/fastai/learner.py", line 446, in load_learner
try: res = torch.load(fname, map_location=map_loc, pickle_module=pickle_module)
File "/home/user/.local/lib/python3.10/site-packages/torch/serialization.py", line 791, in load
with _open_file_like(f, 'rb') as opened_file:
File "/home/user/.local/lib/python3.10/site-packages/torch/serialization.py", line 271, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/home/user/.local/lib/python3.10/site-packages/torch/serialization.py", line 252, in __init__
super().__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\...\\OneDrive\\...\\export.pkl'
Here is the relevant bit for the code:
learn = load_learner(r’C:\Users.…\OneDrive.…\export.pkl’)
I’ve tried escaping the escape characters rather than using a raw string, tried moving the .pkl file but always getting the same error.