Python Forum
Trying to open depracated joblib file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to open depracated joblib file
#1
Hi,

I'm trying to open an old joblib file built by a previous engineer at my work but I have minimal Python experience. I know the model was trained in 2022, and I'm using PyCharm with Python 3.8 and the following packages:

Package Version
------------- -------
joblib 1.0.1
numpy 1.19.0
pip 21.3
scikit-learn 0.23.2
scipy 1.6.3
setuptools 75.1.0
sklearn 0.0
threadpoolctl 3.5.0
wheel 0.44.0

From what I could find, they should all be compatible. Then I ran this code after importing joblib and received the following error:
>> filename = 'model.joblib'
>> model = joblib.load(filename)
Error:
Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\masonml\AppData\Local\Programs\Python\Python38-32\lib\site-packages\joblib\numpy_pickle.py", line 585, in load obj = _unpickle(fobj, filename, mmap_mode) File "C:\Users\masonml\AppData\Local\Programs\Python\Python38-32\lib\site-packages\joblib\numpy_pickle.py", line 504, in _unpickle obj = unpickler.load() File "C:\Users\masonml\AppData\Local\Programs\Python\Python38-32\lib\pickle.py", line 1210, in load dispatch[key[0]](self) File "C:\Users\masonml\AppData\Local\Programs\Python\Python38-32\lib\site-packages\joblib\numpy_pickle.py", line 329, in load_build Unpickler.load_build(self) File "C:\Users\masonml\AppData\Local\Programs\Python\Python38-32\lib\pickle.py", line 1703, in load_build setstate(state) File "sklearn\neighbors\_binary_tree.pxi", line 1160, in sklearn.neighbors._kd_tree.BinaryTree.__setstate__ File "sklearn\neighbors\_binary_tree.pxi", line 1102, in sklearn.neighbors._kd_tree.BinaryTree._update_memviews File "sklearn\neighbors\_binary_tree.pxi", line 215, in sklearn.neighbors._kd_tree.get_memview_ITYPE_1D ValueError: Buffer dtype mismatch, expected 'ITYPE_t' but got 'long long'

Attached Files

Thumbnail(s)
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Joblib worker error sawtooth500 1 1,578 May-03-2024, 06:44 PM
Last Post: sawtooth500
  Open/save file on Android frohr 0 1,109 Jan-24-2024, 06:28 PM
Last Post: frohr
  file open "file not found error" shanoger 8 6,637 Dec-14-2023, 08:03 AM
Last Post: shanoger
  About command 'joblib.load' middlestudent 4 2,688 Sep-25-2023, 05:56 AM
Last Post: middlestudent
  How can i combine these two functions so i only open the file once? cubangt 4 1,917 Aug-14-2023, 05:04 PM
Last Post: snippsat
  I cannot able open a file in python ? ted 5 10,601 Feb-11-2023, 02:38 AM
Last Post: ted
  testing an open file Skaperen 7 2,667 Dec-20-2022, 02:19 AM
Last Post: Skaperen
  I get an FileNotFouerror while try to open(file,"rt"). My goal is to replace str decoded 1 2,034 May-06-2022, 01:44 PM
Last Post: Larz60+
  Dynamic File Name to a shared folder with open command in python sjcsvatt 9 9,898 Jan-07-2022, 04:55 PM
Last Post: bowlofred
  Open an excel file Newbie1114 1 2,837 Jun-16-2021, 09:11 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020