title: FileNotFoundError: [WinError 2] The system cannot find the file specified while loading model from s3
body: <p>I have recently saved a model into s3 using joblib </p>
  
  <p>model_doc is the model object</p>
  
  <pre><code>import subprocess
  import joblib
  
  save_d2v_to_s3_current_doc2vec_model(model_doc,"doc2vec_model")
  
  def save_d2v_to_s3_current_doc2vec_model(model,fname):
      model_name = fname
      joblib.dump(model,model_name)
      s3_base_path = 's3://sd-flikku/datalake/current_doc2vec_model'
      path = s3_base_path+'/'+model_name
      command = "aws s3 cp {} {}".format(model_name,path).split()
      print('saving...'+model_name)
      subprocess.call(command)
  </code></pre>
  
  <p>It was successful, but after that when i try to load the model back from s3 it gives me an error</p>
  
  <pre><code>model = load_d2v("doc2vec_model")
  
  def load_d2v(fname):
      model_name = fname
      s3_base_path='s3://sd-flikku/datalake/current_doc2vec_model'
      path = s3_base_path+'/'+model_name  
      command = "aws s3 cp {} {}".format(path,model_name).split()
      print('loading...'+model_name)
      subprocess.call(command)
      model=joblib.load(model_name)
      return model
  </code></pre>
  
  <p>This is the error i get:</p>
  
  <pre><code>loading...doc2vec_model
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;stdin&gt;", line 7, in load_d2v
    File "C:\Users\prane\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 339, in call
      with Popen(*popenargs, **kwargs) as p:
    File "C:\Users\prane\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 800, in __init__
      restore_signals, start_new_session)
    File "C:\Users\prane\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 1207, in _execute_child
      startupinfo)
  FileNotFoundError: [WinError 2] The system cannot find the file specified
  </code></pre>
  
  <p>I don't even understand why it is saying File not found, this was the path i used to save the model but now i'm unable to get the model back from s3. Please help me!!</p>