ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 74 forks source link

mdf3reader - ImportError reading mdf3, has issues with strings measurement object #149

Closed mtpalmer closed 5 years ago

mtpalmer commented 6 years ago

Python version

sys.version '2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]'

Platform information

platform.platform() 'Windows-7-6.1.7601-SP1'

Numpy version

Please write here the output of printing numpy.__version__ 1.14.0

mdfreader version

Please write here the output of printing mdfreader.__version__ 2.2.7

Description

MDF Version 3.20

Summary :

Attempt to fully open file does not work. Opened file without reading and read the data of each channel to see which channel(s) were causing the issue. I end up receiving several warnings for ImportError on dataRead and one fatal exception when trying to read a string measurement channel.

Troubleshooting:

Opening the file with

mdfobj = mdfreader.mdf('.mdf')

C:\Python27\lib\site-packages\mdfreader\mdf3reader.py:553: UserWarning: Unexpected error: (<type 'exceptions.ImportError'>, ImportError('No module named dataRead',), <traceback object at 0x116B5C10>) warn('Unexpected error: {}'.format(exc_info())) C:\Python27\lib\site-packages\mdfreader\mdf3reader.py:554: UserWarning: dataRead crashed, back to python data reading warn('dataRead crashed, back to python data reading') Traceback (most recent call last): File "C:\cat\cml_pi_analyze\src\read_data_mdf.py", line 31, in mdfobj = mdfreader.mdf('..\data\Drill_Air78.mdf') File "C:\Python27\lib\site-packages\mdfreader\mdf.py", line 159, in init compression=compression) File "C:\Python27\lib\site-packages\mdfreader\mdfreader.py", line 391, in read convertAfterRead, filterChannelNames, compression) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 922, in read3 buf.read(channelSet, self.fileName) # reads datablock potentially containing several channel groups File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 714, in read self.loadSorted(self[recordID]['record'], nameList=channelSet) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 738, in loadSorted return record.readSortedRecord(self.fid, self.pointerToData, nameList) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 561, in readSortedRecord channel.posByteEnd])[0] struct.error: unpack requires a string argument of length 7

However, opening with the following script reveals one string channel having issues, with a bunch of import warnings on most data channels.

yop = mdfreader.mdf('..\data\Drill_Air78.mdf',noDataLoading=True)
for key in yop.keys() :
    print str(key)
    print yop.getChannel(key)
    try:
        print yop.getChannelData(key)
    except Exception as e :
        traceback.print_exc()
        print e
    print "\n"

As an example of the warnings:

t_7 {'description': u'', 'masterType': 1, 'master': 't_7', 'data': None, 'id': (7, 0, 0), 'unit': u's'} C:\Python27\lib\site-packages\mdfreader\mdf3reader.py:553: UserWarning: Unexpected error: (<type 'exceptions.ImportError'>, ImportError('No module named dataRead',), <traceback object at 0x1176A170>) warn('Unexpected error: {}'.format(exc_info())) [0.05094666]

I then actually crashes on, which is a string measurement.

software_group_date_code_str {'description': u'', 'masterType': 1, 'master': 't_7', 'data': None, 'id': (7, 0, 1), 'unit': ''} C:\Python27\lib\site-packages\mdfreader\mdf3reader.py:553: UserWarning: Unexpected error: (<type 'exceptions.ImportError'>, ImportError('No module named dataRead',), <traceback object at 0x116FEB48>) warn('Unexpected error: {}'.format(exc_info())) Traceback (most recent call last): File "C:\cat\cml_pi_analyze\src\read_data_mdf.py", line 38, in print yop.getChannelData(key) File "C:\Python27\lib\site-packages\mdfreader\mdfreader.py", line 458, in getChannelData vect = self._getChannelData3(channelName, raw_data) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 1006, in _getChannelData3 self.read3(fileName=None, info=self.info, channelList=[channelName], convertAfterRead=False) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 922, in read3 buf.read(channelSet, self.fileName) # reads datablock potentially containing several channel groups File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 714, in read self.loadSorted(self[recordID]['record'], nameList=channelSet) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 738, in loadSorted return record.readSortedRecord(self.fid, self.pointerToData, nameList) File "C:\Python27\lib\site-packages\mdfreader\mdf3reader.py", line 561, in readSortedRecord channel.posByteEnd])[0] error: unpack requires a string argument of length 7 unpack requires a string argument of length 7

Total size of mdf file: 3.2 MB

mdfvalidator

image

image

ratal commented 6 years ago

Hi, I guess mdfreader version is 2.7.7 and not 2.2.7 ? Did you correctly build dataRead on your platform ? You can check with python setup.py build_ext. If you have difficulties, I could try to make a wheel for 32bit windows (already existing for 64bit). The warning you have can be filtered if you wish. It just informs that mdfreader is going to a fallback code in python instead of cython dataRead module, therefore slower. For the error regarding the string, there is indeed a bug there in _bits_to_bytes(), thanks for this. I will correct it in a new dev branch.

mtpalmer commented 6 years ago

Hi,

You are correct, typo there, 2.7.7.

Thank you for reading through my issues, glad I could help with finding a bug!

I cloned the master repo and attempted to rebuild with setup.py.

I am having issues building dataRead. For some reason, it is failing on the cython library import in the setup script. It can't seem to find Cython.setuptools and I don't seem to have a setuptools folder/whatever its called in my Cython library. I re-built the cython library without errors and I still don't have it.

Current Version of cython: 0.26

In the setup.py script, I added a print function for failure to import Cython.setuptools.build_ext on line 12

print "Failure to import"

I additionally changed the Cython import to

from Cython.Distutils import build_ext

I do have the standalone visual c++ 9.0 installed, but I get the following error: mdfreader-master>python setup.py build_ext --inplace running build_ext building 'dataRead' extension Traceback (most recent call last): File "setup.py", line 133, in entry_points=entry_points, ext_modules=ext_modules) File "C:\Python27\lib\distutils\core.py", line 166, in setup raise SystemExit, "error: " + str(msg) SystemExit: error: Don't know how to compile dataRead.pyx running build_ext setup.py:144: UserWarning: It is strongly advised to install Cython along with compilation environment for performance and robustness purpose warn('It is strongly advised to install Cython along with compilation environment '

I additionally attempted to use the --compiler flag

python setup.py build_ext --compiler=msvc --inplace and it failed with the same error

I additionally made the following changes to the attempt to build with cython, starting on lines 125, following a cython build tutorial.

try: # with cython installed from Cython.Build import cythonize import numpy ext_modules = cythonize("dataRead.pyx", include_path = [numpy.get_include()]) setup(name=name, version=version, description=description, long_description=long_description, url=url, author=author, author_email=author_email, license=license, classifiers=classifiers, keywords=keywords, packages=packages, install_requires=install_requires, extras_require=extras_require, entry_points=entry_points, ext_modules=ext_modules) except: # without cython import traceback

traceback.print_exc()

It actually tries to build the .pyx but comes back with the following errors:

I, then, run the setup.py cmd with the following command

python setup.py install

And get the following Cython Compile Error and indication that I could not import cython.setuptools:

Failure to import Compiling dataRead.pyx because it changed. [1/1] Cythonizing dataRead.pyx Error compiling Cython file:

... temp4byte &= mask buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:332:37: Attempting to index non-array type 'unsigned int'

Error compiling Cython file:

... temp4byte &= mask buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:332:56: Attempting to index non-array type 'unsigned int'

Error compiling Cython file:

... temp4byte &= mask buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:332:75: Attempting to index non-array type 'unsigned int'

Error compiling Cython file:

... temp4byte &= mask buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:332:93: Attempting to index non-array type 'unsigned int'

Error compiling Cython file:

... temp4byte |= signExtend buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:406:37: Attempting to index non-array type 'int'

Error compiling Cython file:

... temp4byte |= signExtend buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:406:56: Attempting to index non-array type 'int'

Error compiling Cython file:

... temp4byte |= signExtend buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:406:75: Attempting to index non-array type 'int'

Error compiling Cython file:

... temp4byte |= signExtend buf[i] = temp4byte else: for i in range(numberOfRecords): memcpy(&temp4byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp4byte = temp4byte[0]<<32 | temp4byte[1]<<16 | temp4byte[2]<<8 | temp4byte[3] # swap bytes ^

dataRead.pyx:406:93: Attempting to index non-array type 'int'

Error compiling Cython file:

... temp8byte &= mask buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:482:37: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... temp8byte &= mask buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:482:56: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... temp8byte &= mask buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:482:75: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... temp8byte &= mask buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:482:94: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:483:37: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:483:56: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:483:75: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:483:93: Attempting to index non-array type 'unsigned long long'

Error compiling Cython file:

... temp8byte |= signExtend buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:602:37: Attempting to index non-array type 'long long'

Error compiling Cython file:

... temp8byte |= signExtend buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:602:56: Attempting to index non-array type 'long long'

Error compiling Cython file:

... temp8byte |= signExtend buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:602:75: Attempting to index non-array type 'long long'

Error compiling Cython file:

... temp8byte |= signExtend buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ ^

dataRead.pyx:602:94: Attempting to index non-array type 'long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:603:37: Attempting to index non-array type 'long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:603:56: Attempting to index non-array type 'long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:603:75: Attempting to index non-array type 'long long'

Error compiling Cython file:

... buf[i] = temp8byte else: for i in range(numberOfRecords): memcpy(&temp8byte, &bita[posByteBeg + record_byte_size * i], nBytes) temp8byte = temp8byte[0]<<56 | temp8byte[1]<<48 | temp8byte[2]<<40 | temp8byte[3]<<32 | \ temp8byte[4]<<24 | temp8byte[5]<<16 | temp8byte[6]<<8 | temp8byte[7] # swap bytes ^

dataRead.pyx:603:93: Attempting to index non-array type 'long long' Traceback (most recent call last): File "setup.py", line 127, in ext_modules = cythonize("dataRead.pyx", include_path = [numpy.get_include()]) File "C:\Python27\lib\site-packages\Cython\Build\Dependencies.py", line 1016, in cythonize cythonize_one(*args) File "C:\Python27\lib\site-packages\Cython\Build\Dependencies.py", line 1138, in cythonize_one raise CompileError(None, pyx_file) CompileError: dataRead.pyx

ratal commented 6 years ago

Hi, Dev branch should arrange your situation there, both for compilation and string bug. However, there are still warnings from compilation I cannot figure out yet (very rare case I think of byte swapping with long long type + numpy API deprecation) Please confirm if it solves your issue.

mtpalmer commented 6 years ago

Corrected issue with string bug.

Have an error with compilation where the include directory for /site-packages/numpy/core is expected to be in the distutils config.

\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /TcdataRead.c /Fobuild\temp .win32-2.7\Release\dataRead.obj dataRead.c dataRead.c(580) : fatal error C1083: Cannot open include file: 'numpy/arrayobject.h': No such file or directory running build_ext setup.py:135: UserWarning: It is strongly advised to install Cython along with compilation environment for performance and robustness purpose warn('It is strongly advised to install Cython along with compilation environment ' After adding a distutils.cfg file to C:\Python27\distutils\ with the following include path [build_ext] include_dirs= C:\Python27\Lib\site-packages\numpy\core\include It worked with the following warnings: \\mdfreader-dev\mdfreader-dev>python setup.py build_ext --inplace running build_ext building 'dataRead' extension \\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\Lib\site-packages\numpy\core\include -IC:\Python27\i nclude -IC:\Python27\PC /TcdataRead.c /Fobuild\temp.win32-2.7\Release\dataRead.obj dataRead.c c:\python27\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION dataRead.c(7413) : warning C4244: '=' : conversion from 'unsigned long' to 'unsigned char', possible loss of data dataRead.c(7718) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(7718) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(7718) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(7718) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(7958) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(7958) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(7958) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(8198) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(8198) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(8438) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(8685) : warning C4244: '=' : conversion from 'unsigned long' to 'unsigned char', possible loss of data dataRead.c(8703) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) dataRead.c(8968) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9054) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9054) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9054) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9054) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9119) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9282) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9368) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9368) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9368) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9433) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9596) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9682) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9682) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(9747) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9910) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(9996) : warning C4293: '<<' : shift count negative or too big, undefined behavior dataRead.c(10061) : warning C4244: '=' : conversion from '__int64' to 'long', possible loss of data dataRead.c(10236) : warning C4244: 'function' : conversion from 'unsigned __int64' to 'Py_ssize_t', possible loss of data dataRead.c(10366) : warning C4244: 'function' : conversion from 'unsigned __int64' to 'Py_ssize_t', possible loss of data dataRead.c(15531) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data dataRead.c(15537) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data \Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild /EXPORT:initdataR ead build\temp.win32-2.7\Release\dataRead.obj /OUT:build\lib.win32-2.7\dataRead.pyd /IMPLIB:build\temp.win32-2.7\Release\dataRead.lib /MANIFESTFILE:build\temp.win32-2.7\Release\dataRead.pyd.manifest Creating library build\temp.win32-2.7\Release\dataRead.lib and object build\temp.win32-2.7\Release\dataRead.exp copying build\lib.win32-2.7\dataRead.pyd -> Left shift is probably giving you warnings because of potential loss of sign After re-running the setup through pip, it worked and I no longer get the dataread missing warnings. I did not compare the resulting "read" data from the python implementation and the compiled dataread.c.
ratal commented 5 years ago

Hi, Thanks for the confirmation. Those compilation warning cannot be avoided as it is related to bit shift.