Skip to content

Commit 6499366

Browse files
authored
Improve Windows compatibility for loading epicure data
Refactor loading logic for epicure data on Windows to handle path compatibility.
1 parent 1131f86 commit 6499366

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/epicure/epicuring.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,11 @@ def load_epicure_data(self, epiname):
804804
"""Load saved infos from file"""
805805
infile = open(epiname, "rb")
806806
try:
807-
if ut.is_windows():
808-
epidata = pickle.load( infile, encoding="utf8" )
809-
else:
810-
epidata = pickle.load( infile )
807+
if ut.is_windows():
808+
import pathlib
809+
pathlib.PosixPath = pathlib.WindowsPath
810+
#epidata = pickle.load( infile, encoding="utf8" )
811+
epidata = pickle.load( infile )
811812
#print(epidata)
812813
if "EpiMetaData" in epidata.keys():
813814
# version of epicure file after Epicure 0.2.0

0 commit comments

Comments
 (0)