-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi!
Seems the reading SAV file is the showstopper - did workaround mentioned somewhere:
used pyreadstat and imported dataframe with dataset.from_components(df)
Unfortunately I miss SPSS meta data goodies. BTW is it possible to somehow import pyreadstat META part?
What I get with:
import quantipy as qp
dataset = qp.DataSet("My dataset, wave 1")
dataset.read_spss('"D:/tmp/Example Data (A).sav"')
is an error (using PyCharm and Python 3.7 venv):
Traceback (most recent call last):
File "C:/Users/zbatagelj/PycharmProjects/Valiconer/t.py", line 10, in
dataset.read_spss("D:/tmp/Example Data (B).sav")
File "C:\Users\zbatagelj\quantipy3\quantipy\core\dataset.py", line 601, in read_spss
self._meta, self.data = r_spss(path_sav+'.sav', **kwargs)
File "C:\Users\zbatagelj\quantipy3\quantipy\core\tools\dp\io.py", line 331, in read_spss
meta, data = parse_sav_file(path_sav, **kwargs)
File "C:\Users\zbatagelj\quantipy3\quantipy\core\tools\dp\spss\reader.py", line 40, in parse_sav_file
data = extract_sav_data(filepath, ioLocale=ioLocale, ioUtf8=ioUtf8)
File "C:\Users\zbatagelj\quantipy3\quantipy\core\tools\dp\spss\reader.py", line 48, in extract_sav_data
with sr.SavReader(sav_file, returnHeader=True, ioLocale=ioLocale, ioUtf8=ioUtf8) as reader:
File "C:\Users\zbatagelj\quantipy3\savReaderWriter\savReader.py", line 60, in init
ioUtf8, ioLocale)
File "C:\Users\zbatagelj\quantipy3\savReaderWriter\header.py", line 31, in init
super(Header, self).init(savFileName, ioUtf8, ioLocale)
File "C:\Users\zbatagelj\quantipy3\savReaderWriter\generic.py", line 30, in init
self.libc = cdll.LoadLibrary(ctypes.util.find_library("c"))
File "C:\Users\zbatagelj\AppData\Local\Programs\Python\Python37\lib\ctypes_init.py", line 442, in LoadLibrary
return self.dlltype(name)
File "C:\Users\zbatagelj\AppData\Local\Programs\Python\Python37\lib\ctypes_init.py", line 364, in init
self._handle = _dlopen(self._name, mode)
TypeError: LoadLibrary() argument 1 must be str, not None