diff --git a/trains/backend_interface/metrics/events.py b/trains/backend_interface/metrics/events.py index 6997bd5e..43ef4f8a 100644 --- a/trains/backend_interface/metrics/events.py +++ b/trains/backend_interface/metrics/events.py @@ -183,7 +183,9 @@ class UploadEvent(MetricsEventAdapter): @staticmethod def _replace_slash(part): - return part.replace('\\', '/').strip('/').replace('/', '.slash.') + # replace the three quote symbols we cannot have, + # notice % will be converted to %25 when the link is quoted, so we should not use it + return part.replace('\\', '/').strip('/').replace('/', '.slash.').replace('?', '0x3F').replace('#', '0x23') def __init__(self, metric, variant, image_data, local_image_path=None, iter=0, upload_uri=None, file_history_size=None, delete_after_upload=False, **kwargs):