-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
The error is :
File "/home/fish/Documents/API/DSLAB/AIMS/A.py", line 3, in <module>
model = pickle.load(open('AIMS.pkl', 'rb'))
File "/home/fish/anaconda3/envs/DSLAB/lib/python3.9/site-packages/keras/saving/pickle_utils.py",
line 39, in deserialize_model_from_bytecode
with tarfile.open(fileobj=b, mode="r") as archive:
File "/home/fish/anaconda3/envs/DSLAB/lib/python3.9/tarfile.py", line 1614, in open
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully
Issue
The issue is when i work in jupyter notebook, it does work and gives me the true mode.
But when i try to import the model in .py file. it fails.
I think there is an inconsistency between this 2 format file operations.
Code block
import pickle
model = pickle.load(open('AIMS.pkl', 'rb'))Simple code can show the error reproductively.
- Operating system and architecture: Ubuntu 20.04 LTS
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status


