sccn / xdf

BSD 2-Clause "Simplified" License
87 stars 34 forks source link

The error I get: not a valid XDF file! #16

Closed fatemeh66 closed 6 years ago

fatemeh66 commented 6 years ago

I am sure the XDF file is valid, but I get this error.

fatemeh66 commented 6 years ago

@cboulay

cboulay commented 6 years ago

How did you try to open it? Python, Matlab, using libxdf (which hasn't been merged yet, sorry!).

fatemeh66 commented 6 years ago

In Jupyter (python).

cboulay commented 6 years ago

Can you please post some sample code and if possible post a minimal file that generates this error?

Also, have you tried opening the xdf file with XDFBrowser or Matlab?

fatemeh66 commented 6 years ago

I opened the file in RStudio.

Here is the code: dataframe_blobdata = load_xdf(LOCALFILENAME) The result: Importing XDF file Line1.xdf...


Exception Traceback (most recent call last)

in () ----> 1 dataframe_blobdata = load_xdf(LOCALFILENAME) in load_xdf(filename, on_chunk, verbose, synchronize_clocks, handle_clock_resets, dejitter_timestamps, jitter_break_threshold_seconds, jitter_break_threshold_samples, clock_reset_threshold_seconds, clock_reset_threshold_stds, clock_reset_threshold_offset_seconds, clock_reset_threshold_offset_stds, winsor_threshold) 75 # read [MagicCode] 76 if f.read(4) != b'XDF:': ---> 77 raise Exception('not a valid XDF file: %s' % filename) 78 79 # for each chunk... Exception: not a valid XDF file: Line1.xdf
cboulay commented 6 years ago

I didn't realize there was an xdf importer for R. Can you tell me more about that?

But, on topic, how was this xdf file created?

fatemeh66 commented 6 years ago

We can use xdf files in Microsoft R. The details of creating and using this sort of file is explained in the following link: https://docs.microsoft.com/en-us/machine-learning-server/r/concept-what-is-xdf

cboulay commented 6 years ago

They have the same file extension but they have nothing to do with each other. Microsoft's xdf file format is not the same as sccn/labstreaminglayer's xdf file format.

fatemeh66 commented 6 years ago

Yes, you are right