Its because of wrong path provided. It may be that the url contains space and if the case url has to be properly constructed.
The correct url should be in the format with file name included like "http://server name/document library name/new file name"
So if report.xlsx is the file that has to be uploaded at "http://server name/Team/Dev Team" then path comes out to be is "http://server name/Team/Dev Team/report.xlsx". It contains space so it should be reconstructed as "http://server name/Team/Dev%20Team/report.xlsx" and should be used.