mirror of
https://github.com/clearml/clearml
synced 2025-03-03 18:52:12 +00:00
Fix offline mode to support python3.5
This commit is contained in:
parent
2c68a188d9
commit
de61dbf54e
@ -262,7 +262,7 @@ class Metrics(InterfaceBase):
|
||||
remote_url = remote_url[:-1]
|
||||
uploaded_files = set()
|
||||
task_id = task.id
|
||||
with open(filename, 'rt') as f:
|
||||
with open(filename.as_posix(), 'rt') as f:
|
||||
i = 0
|
||||
while True:
|
||||
try:
|
||||
|
@ -259,7 +259,7 @@ class TaskHandler(BufferingHandler):
|
||||
filename = Path(folder) / cls.__offline_filename
|
||||
if not filename.is_file():
|
||||
return False
|
||||
with open(filename, 'rt') as f:
|
||||
with open(filename.as_posix(), 'rt') as f:
|
||||
i = 0
|
||||
while True:
|
||||
try:
|
||||
|
@ -543,7 +543,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
||||
if self._offline_mode:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
with open(self.get_offline_mode_folder() / self._offline_filename, 'rt') as f:
|
||||
with open((self.get_offline_mode_folder() / self._offline_filename).as_posix(), 'rt') as f:
|
||||
stored_dict = json.load(f)
|
||||
stored_data = tasks.Task(**stored_dict)
|
||||
# add missing entries
|
||||
|
@ -1710,7 +1710,7 @@ class Task(_Task):
|
||||
raise ValueError("Could not find the session folder / zip-file {}".format(session_folder))
|
||||
|
||||
try:
|
||||
with open(session_folder / cls._offline_filename, 'rt') as f:
|
||||
with open((session_folder / cls._offline_filename).as_posix(), 'rt') as f:
|
||||
export_data = json.load(f)
|
||||
except Exception as ex:
|
||||
raise ValueError(
|
||||
|
Loading…
Reference in New Issue
Block a user