diff -r 7f9605b75689 -r 8acea12976c4 scc_access/scc_access.py --- a/scc_access/scc_access.py Thu Dec 19 18:03:16 2019 +0200 +++ b/scc_access/scc_access.py Fri Dec 20 14:36:21 2019 +0200 @@ -13,7 +13,7 @@ from io import BytesIO import sys import time -import urlparse + from zipfile import ZipFile import yaml @@ -472,7 +472,7 @@ return measurement_id - def get_ancillary(self, filename, file_type): + def get_ancillary(self, file_path, file_type): """ Try to get the ancillary file data from the SCC API. @@ -480,8 +480,8 @@ Parameters ---------- - filename : str - Filename of the uploaded file. + file_path : str + Path of the uploaded file. file_type : str Type of ancillary file. One of 'sounding', 'overlap', 'lidarratio'. @@ -491,6 +491,8 @@ """ assert file_type in ['sounding', 'overlap', 'lidarratio'] + filename = os.path.basename(file_path) + if file_type == 'sounding': file_url = self.api_sounding_search_pattern.format(filename) elif file_type == 'overlap':